We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80f5c21 commit 407c78dCopy full SHA for 407c78d
clang/test/AST/ByteCode/cxx23.cpp
@@ -488,5 +488,11 @@ namespace InactiveLocalsInConditionalOp {
488
static_assert( (true ? A().get() : 1) == 1); // all-error {{not an integral constant expression}} \
489
// all-note {{non-constexpr function '~A' cannot be used in a constant expression}}
490
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
+
497
}
498
#endif
0 commit comments