File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify -std=c++20 %s
2
- // RUN: %clang_cc1 -verify=ref -std=c++20 %s
1
+ // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=expected,both -std=c++20 %s
2
+ // RUN: %clang_cc1 -verify=ref,both -std=c++20 %s
3
3
4
4
constexpr int a = 12 ;
5
5
constexpr int f = [c = a]() { return c; }();
@@ -43,18 +43,15 @@ static_assert(add2(4, 5) == 11);
43
43
44
44
constexpr int div (int a, int b) {
45
45
auto f = [=]() {
46
- return a / b; // expected-note {{division by zero}} \
47
- // ref-note {{division by zero}}
46
+ return a / b; // both-note {{division by zero}}
48
47
};
49
48
50
49
return f (); // expected-note {{in call to '&f->operator()()'}} \
51
50
// ref-note {{in call to 'f.operator()()'}}
52
51
}
53
52
static_assert (div(8 , 2 ) == 4);
54
- static_assert (div(8 , 0 ) == 4); // expected-error {{not an integral constant expression}} \
55
- // expected-note {{in call to 'div(8, 0)'}} \
56
- // ref-error {{not an integral constant expression}} \
57
- // ref-note {{in call to 'div(8, 0)'}}
53
+ static_assert (div(8 , 0 ) == 4); // both-error {{not an integral constant expression}} \
54
+ // both-note {{in call to 'div(8, 0)'}}
58
55
59
56
60
57
struct F {
You can’t perform that action at this time.
0 commit comments