aboutsummaryrefslogtreecommitdiff
path: root/clang/test
diff options
context:
space:
mode:
authorTimm Bäder <tbaeder@redhat.com>2024-07-05 14:09:20 +0200
committerTimm Bäder <tbaeder@redhat.com>2024-07-09 09:23:14 +0200
commit93869dfd89387844bf8b605ebcd1abc0cc81bde8 (patch)
tree5311b9d9eb7f130abcc5322bc155ad683a6844bc /clang/test
parenteee9efb09c1a3cbbb1ad5471713f3da218c8b00e (diff)
downloadllvm-93869dfd89387844bf8b605ebcd1abc0cc81bde8.zip
llvm-93869dfd89387844bf8b605ebcd1abc0cc81bde8.tar.gz
llvm-93869dfd89387844bf8b605ebcd1abc0cc81bde8.tar.bz2
[clang][Interp][NFC] Simplify a test case
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/AST/Interp/lifetimes.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/test/AST/Interp/lifetimes.cpp b/clang/test/AST/Interp/lifetimes.cpp
index c1046e5..c544bab 100644
--- a/clang/test/AST/Interp/lifetimes.cpp
+++ b/clang/test/AST/Interp/lifetimes.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify %s
-// RUN: %clang_cc1 -verify=ref %s
+// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=expected,both %s
+// RUN: %clang_cc1 -verify=ref,both %s
struct Foo {
int a;
@@ -16,9 +16,7 @@ constexpr int dead1() { // expected-error {{never produces a constant expression
return F2->a; // expected-note 2{{read of variable whose lifetime has ended}} \
// ref-note {{read of object outside its lifetime is not allowed in a constant expression}}
}
-static_assert(dead1() == 1, ""); // expected-error {{not an integral constant expression}} \
- // expected-note {{in call to}} \
- // ref-error {{not an integral constant expression}} \
- // ref-note {{in call to}} \
+static_assert(dead1() == 1, ""); // both-error {{not an integral constant expression}} \
+ // both-note {{in call to}}