[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 2 11:22:20 PDT 2025
================
@@ -15,18 +15,19 @@ void f(int n) {
return;
}
case 2:
+ // FIXME: Should we emit an error {{fallthrough annotation does not directly precede switch label}}?
----------------
yronglin wrote:
Hmm, this because I originally set the new diagnostic's severity to `Error`, which will interrupt the warning static analysis based warnings.
https://github.com/llvm/llvm-project/blob/da01257c3a16b728718f9bde8bbe435678d96fd8/clang/lib/Sema/AnalysisBasedWarnings.cpp#L2632-L2633
I have changed the severity to `Warning` now.
https://github.com/llvm/llvm-project/pull/146224
More information about the cfe-commits
mailing list