1 // RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t
2 // RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t -verify %s
4 // RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch -fpch-instantiate-templates %s -o %t
5 // RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t -verify %s
7 #ifndef HEADER_INCLUDED
9 #define HEADER_INCLUDED
22 constexpr D(int n
) : B('x'), k(2*n
+1) {}
26 constexpr int value
= 7;
29 constexpr T
plus_seven(T other
) {
35 static_assert(D(4).k
== 9, "");
36 constexpr int f(C c
) { return 0; } // expected-error {{not a literal type}}
37 // expected-note@16 {{not an aggregate and has no constexpr constructors}}
38 constexpr B b
; // expected-error {{constant expression}} expected-note {{non-constexpr}}
39 // expected-note@12 {{here}}
41 static_assert(plus_seven(3) == 10, "");