[clang] [clang] Reject a label with no statement as a substatement (PR #244133)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 4 02:02:18 PST 2026
https://github.com/cor3ntin requested changes to this pull request.
We should also warn that labels outside of compound statements are an obsolescent features.
While the patch improves conformance, it makes Diagnostics worse.
We could rename and extend `DiagnoseLabelAtEndOfCompoundStatement` to cover
- existing warning
- obsolescent diagnostic in c23
- a new, dedicated error for the case you are covering.
For recovery, we should let it form a null statement in all cases
https://github.com/llvm/llvm-project/pull/244133
More information about the cfe-commits
mailing list