|
1 | | -// RUN: %clang_cc1 -std=c++23 -verify=expected,nointerpreter %s |
2 | | -// RUN: %clang_cc1 -std=c++23 -verify %s -fexperimental-new-constant-interpreter |
| 1 | +// RUN: %clang_cc1 -std=c++23 -verify %s |
| 2 | +// RUN: %clang_cc1 -std=c++23 -verify=expected,interpreter %s -fexperimental-new-constant-interpreter |
3 | 3 |
|
4 | 4 | using size_t = decltype(sizeof(0)); |
5 | 5 |
|
@@ -48,10 +48,11 @@ void splash(Swim& swam) { |
48 | 48 | } |
49 | 49 |
|
50 | 50 | extern Swim dc; |
51 | | -extern Swim& trident; |
| 51 | +extern Swim& trident; // interpreter-note {{declared here}} |
52 | 52 |
|
53 | 53 | constexpr auto& sandeno = typeid(dc); // ok: can only be typeid(Swim) |
54 | | -constexpr auto& gallagher = typeid(trident); // expected-error {{constexpr variable 'gallagher' must be initialized by a constant expression}} |
| 54 | +constexpr auto& gallagher = typeid(trident); // expected-error {{constexpr variable 'gallagher' must be initialized by a constant expression}} \ |
| 55 | + // interpreter-note {{initializer of 'trident' is unknown}} |
55 | 56 |
|
56 | 57 | namespace explicitThis { |
57 | 58 | struct C { |
@@ -157,18 +158,18 @@ int g() { |
157 | 158 |
|
158 | 159 | namespace GH128409 { |
159 | 160 | int &ff(); |
160 | | - int &x = ff(); // nointerpreter-note {{declared here}} |
| 161 | + int &x = ff(); // expected-note {{declared here}} |
161 | 162 | constinit int &z = x; // expected-error {{variable does not have a constant initializer}} \ |
162 | 163 | // expected-note {{required by 'constinit' specifier here}} \ |
163 | | - // nointerpreter-note {{initializer of 'x' is not a constant expression}} |
| 164 | + // expected-note {{initializer of 'x' is not a constant expression}} |
164 | 165 | } |
165 | 166 |
|
166 | 167 | namespace GH129845 { |
167 | 168 | int &ff(); |
168 | | - int &x = ff(); // nointerpreter-note {{declared here}} |
| 169 | + int &x = ff(); // expected-note {{declared here}} |
169 | 170 | struct A { int& x; }; |
170 | 171 | constexpr A g = {x}; // expected-error {{constexpr variable 'g' must be initialized by a constant expression}} \ |
171 | | - // nointerpreter-note {{initializer of 'x' is not a constant expression}} |
| 172 | + // expected-note {{initializer of 'x' is not a constant expression}} |
172 | 173 | const A* gg = &g; |
173 | 174 | } |
174 | 175 |
|
|
0 commit comments