Skip to content

Commit 407c78d

Browse files
committed
Another test case
1 parent 80f5c21 commit 407c78d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/test/AST/ByteCode/cxx23.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,5 +488,11 @@ namespace InactiveLocalsInConditionalOp {
488488
static_assert( (true ? A().get() : 1) == 1); // all-error {{not an integral constant expression}} \
489489
// all-note {{non-constexpr function '~A' cannot be used in a constant expression}}
490490

491+
constexpr bool test2(bool b) {
492+
unsigned long __ms = b ? (const unsigned long &)0 : __ms;
493+
return true;
494+
}
495+
static_assert(test2(true));
496+
491497
}
492498
#endif

0 commit comments

Comments
 (0)