1 // RUN: %clang_cc1 -std=c++2a -include %s -verify %s
2 // RUN: %clang_cc1 -std=c++2a -emit-pch %s -o %t
3 // RUN: %clang_cc1 -std=c++2a -include-pch %t -verify %s -DPCH
4 // RUN: %clang_cc1 -std=c++2a -emit-pch -fpch-instantiate-templates %s -o %t
5 // RUN: %clang_cc1 -std=c++2a -include-pch %t -verify %s -DPCH
11 unsigned int n
: 5 = 49; // expected-warning {{changes value}}
15 template<bool B
> struct T
{
16 int m
: B
? 8 : a
= 42;
21 // expected-error@-5 {{constant expression}} expected-note@-5 {{cannot modify}}
23 static_assert(S().n
== 17);
24 static_assert(T
<true>().m
== 0);
25 int q
= T
<false>().m
; // expected-note {{instantiation of}}