Skip to content

Commit 93869df

Browse files
committed
[clang][Interp][NFC] Simplify a test case
1 parent eee9efb commit 93869df

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang/test/AST/Interp/lifetimes.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify %s
2-
// RUN: %clang_cc1 -verify=ref %s
1+
// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=expected,both %s
2+
// RUN: %clang_cc1 -verify=ref,both %s
33

44
struct Foo {
55
int a;
@@ -16,9 +16,7 @@ constexpr int dead1() { // expected-error {{never produces a constant expression
1616
return F2->a; // expected-note 2{{read of variable whose lifetime has ended}} \
1717
// ref-note {{read of object outside its lifetime is not allowed in a constant expression}}
1818
}
19-
static_assert(dead1() == 1, ""); // expected-error {{not an integral constant expression}} \
20-
// expected-note {{in call to}} \
21-
// ref-error {{not an integral constant expression}} \
22-
// ref-note {{in call to}} \
19+
static_assert(dead1() == 1, ""); // both-error {{not an integral constant expression}} \
20+
// both-note {{in call to}}
2321

2422

0 commit comments

Comments
 (0)