Skip to content

Commit ddeefc1

Browse files
committed
Address review comment: escape end of line instead of using "@-1"
1 parent 5ce2daf commit ddeefc1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/test/SemaCXX/constant-expression-p2280r4.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ void splash(Swim& swam) {
3939
static_assert(swam.phelps() == 28); // ok
4040
static_assert((&swam)->phelps() == 28); // ok
4141
Swim* pswam = &swam; // expected-note {{declared here}}
42-
static_assert(pswam->phelps() == 28); // expected-error {{static assertion expression is not an integral constant expression}}
43-
// expected-note@-1 {{read of non-constexpr variable 'pswam' is not allowed in a constant expression}}
42+
static_assert(pswam->phelps() == 28); // expected-error {{static assertion expression is not an integral constant expression}} \
43+
// expected-note {{read of non-constexpr variable 'pswam' is not allowed in a constant expression}}
4444
static_assert(how_many(swam) == 28); // ok
4545
static_assert(Swim().lochte() == 12); // ok
4646
static_assert(swam.lochte() == 12); // expected-error {{static assertion expression is not an integral constant expression}}
@@ -158,17 +158,17 @@ int g() {
158158
namespace GH128409 {
159159
int &ff();
160160
int &x = ff(); // nointerpreter-note {{declared here}}
161-
constinit int &z = x; // expected-error {{variable does not have a constant initializer}}
162-
// expected-note@-1 {{required by 'constinit' specifier here}}
163-
// nointerpreter-note@-2 {{initializer of 'x' is not a constant expression}}
161+
constinit int &z = x; // expected-error {{variable does not have a constant initializer}} \
162+
// expected-note {{required by 'constinit' specifier here}} \
163+
// nointerpreter-note {{initializer of 'x' is not a constant expression}}
164164
}
165165

166166
namespace GH129845 {
167167
int &ff();
168168
int &x = ff(); // nointerpreter-note {{declared here}}
169169
struct A { int& x; };
170-
constexpr A g = {x}; // expected-error {{constexpr variable 'g' must be initialized by a constant expression}}
171-
// nointerpreter-note@-1 {{initializer of 'x' is not a constant expression}}
170+
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}}
172172
const A* gg = &g;
173173
}
174174

0 commit comments

Comments
 (0)