19ca5c425SRichard Smith // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2a85fc0a2SPeter Collingbourne 
3*af7d76c7SRichard Trieu constexpr int x = 1;  // expected-note {{variable 'x' declared const here}}
id(int x)4a85fc0a2SPeter Collingbourne constexpr int id(int x) { return x; }
5a85fc0a2SPeter Collingbourne 
foo(void)6a85fc0a2SPeter Collingbourne void foo(void) {
7*af7d76c7SRichard Trieu   x = 2; // expected-error {{cannot assign to variable 'x' with const-qualified type 'const int'}}
8a85fc0a2SPeter Collingbourne   int (*idp)(int) = id;
9a85fc0a2SPeter Collingbourne }
10a85fc0a2SPeter Collingbourne 
11