[clang] [clang] Call ActOnCaseExpr even if the 'case' is missing (PR #166326)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 4 08:40:44 PST 2025
================
@@ -1450,3 +1450,9 @@ namespace GH149500 {
unsigned int * p = &(*(unsigned int *)0x400);
static const void *q = &(*(const struct sysrq_key_op *)0);
}
+
+constexpr bool missingCase() {
+ switch (1) {
+ 1u: return false; // expected-error {{expected 'case' keyword before expression}}
----------------
AaronBallman wrote:
Ah, I see now that my godbolt link does show the issue with an asserts build, that makes more sense now. Thank you!
https://github.com/llvm/llvm-project/pull/166326
More information about the cfe-commits
mailing list