Skip to content

Commit d42f395

Browse files
committed
[clang][Interp][NFC] Convert test to verify=expected,both style
1 parent 66d4fe9 commit d42f395

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

clang/test/AST/Interp/switch.cpp

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

44
constexpr bool isEven(int a) {
55
bool v = false;
@@ -75,20 +75,14 @@ constexpr int test(int val) {
7575
}
7676
static_assert(test(1) == 100, "");
7777

78-
constexpr int bad(int val) { return val / 0; } // expected-warning {{division by zero}} \
79-
// ref-warning {{division by zero}}
80-
constexpr int another_test(int val) { // expected-note {{declared here}} \
81-
// ref-note {{declared here}}
78+
constexpr int bad(int val) { return val / 0; } // both-warning {{division by zero}}
79+
constexpr int another_test(int val) { // both-note {{declared here}}
8280
switch (val) {
83-
case bad(val): return 100; // expected-error {{case value is not a constant expression}} \
84-
// expected-note {{cannot be used in a constant expression}} \
85-
// ref-error {{case value is not a constant expression}} \
86-
// ref-note {{cannot be used in a constant expression}}
81+
case bad(val): return 100; // both-error {{case value is not a constant expression}} \
82+
// both-note {{cannot be used in a constant expression}}
8783
default: return -1;
8884
}
8985
return 0;
9086
}
91-
static_assert(another_test(1) == 100, ""); // expected-error {{static assertion failed}} \
92-
// expected-note {{evaluates to}} \
93-
// ref-error {{static assertion failed}} \
94-
// ref-note {{evaluates to}}
87+
static_assert(another_test(1) == 100, ""); // both-error {{static assertion failed}} \
88+
// both-note {{evaluates to}}

0 commit comments

Comments
 (0)