Skip to content

Commit b26b29d

Browse files
committed
more tests
1 parent 7d6b68a commit b26b29d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ struct S {
249249
constexpr ~S() {
250250
delete c;
251251
}
252+
int i = 0;
252253
};
253254

254255
int f() {
@@ -261,6 +262,9 @@ int f() {
261262
if constexpr(S s; (s, true)) { // expected-warning{{left operand of comma operator has no effect}}
262263
return 1;
263264
}
265+
if constexpr(constexpr int _ = S{}.i; true) {
266+
return 1;
267+
}
264268
return 0;
265269
}
266270
}

0 commit comments

Comments
 (0)