@@ -5,65 +5,49 @@ namespace Throw {
55
66 constexpr int ConditionalThrow (bool t) {
77 if (t)
8- throw 4 ; // expected-note {{subexpression not valid in a constant expression}} \
9- // ref-note {{subexpression not valid in a constant expression}}
8+ throw 4 ; // both-note {{subexpression not valid in a constant expression}}
109
1110 return 0 ;
1211 }
1312
1413 static_assert (ConditionalThrow(false ) == 0 , " " );
15- static_assert (ConditionalThrow(true ) == 0 , " " ); // expected-error {{not an integral constant expression}} \
16- // expected-note {{in call to 'ConditionalThrow(true)'}} \
17- // ref-error {{not an integral constant expression}} \
18- // ref-note {{in call to 'ConditionalThrow(true)'}}
14+ static_assert (ConditionalThrow(true ) == 0 , " " ); // both-error {{not an integral constant expression}} \
15+ // both-note {{in call to 'ConditionalThrow(true)'}}
1916
20- constexpr int Throw () { // expected-error {{never produces a constant expression}} \
21- // ref-error {{never produces a constant expression}}
22- throw 5 ; // expected-note {{subexpression not valid in a constant expression}} \
23- // ref-note {{subexpression not valid in a constant expression}}
17+ constexpr int Throw () { // both-error {{never produces a constant expression}}
18+ throw 5 ; // both-note {{subexpression not valid in a constant expression}}
2419 return 0 ;
2520 }
2621
27- constexpr int NoSubExpr () { // ref-error {{never produces a constant expression}} \
28- // expected-error {{never produces a constant expression}}
29- throw ; // ref-note 2{{subexpression not valid}} \
30- // expected-note 2{{subexpression not valid}}
22+ constexpr int NoSubExpr () { // both-error {{never produces a constant expression}}
23+ throw ; // both-note 2{{subexpression not valid}}
3124 return 0 ;
3225 }
33- static_assert (NoSubExpr() == 0 , " " ); // ref-error {{not an integral constant expression}} \
34- // ref-note {{in call to}} \
35- // expected-error {{not an integral constant expression}} \
36- // expected-note {{in call to}}
26+ static_assert (NoSubExpr() == 0 , " " ); // both-error {{not an integral constant expression}} \
27+ // both-note {{in call to}}
3728}
3829
3930namespace Asm {
4031 constexpr int ConditionalAsm (bool t) {
4132 if (t)
42- asm (" " ); // expected-note {{subexpression not valid in a constant expression}} \
43- // ref-note {{subexpression not valid in a constant expression}}
33+ asm (" " ); // both-note {{subexpression not valid in a constant expression}}
4434
4535 return 0 ;
4636 }
4737 static_assert (ConditionalAsm(false ) == 0 , " " );
48- static_assert (ConditionalAsm(true ) == 0 , " " ); // expected-error {{not an integral constant expression}} \
49- // expected-note {{in call to 'ConditionalAsm(true)'}} \
50- // ref-error {{not an integral constant expression}} \
51- // ref-note {{in call to 'ConditionalAsm(true)'}}
38+ static_assert (ConditionalAsm(true ) == 0 , " " ); // both-error {{not an integral constant expression}} \
39+ // both-note {{in call to 'ConditionalAsm(true)'}}
5240
5341
54- constexpr int Asm () { // expected-error {{never produces a constant expression}} \
55- // ref-error {{never produces a constant expression}}
56- __asm volatile (" " ); // expected-note {{subexpression not valid in a constant expression}} \
57- // ref-note {{subexpression not valid in a constant expression}}
42+ constexpr int Asm () { // both-error {{never produces a constant expression}}
43+ __asm volatile (" " ); // both-note {{subexpression not valid in a constant expression}}
5844 return 0 ;
5945 }
6046}
6147
6248namespace Casts {
63- constexpr int a = reinterpret_cast <int >(12 ); // expected-error {{must be initialized by a constant expression}} \
64- // expected-note {{reinterpret_cast is not allowed}} \
65- // ref-error {{must be initialized by a constant expression}} \
66- // ref-note {{reinterpret_cast is not allowed}}
49+ constexpr int a = reinterpret_cast <int >(12 ); // both-error {{must be initialized by a constant expression}} \
50+ // both-note {{reinterpret_cast is not allowed}}
6751
6852 void func () {
6953 struct B {};
0 commit comments