This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3285f9a2392f: [Clang] Support case and default labels at end
of compound statement (authored by Izaron).
Repository:
rG LLVM Github Monorepo
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134207/new/
https://reviews.llvm.org/D134207
Izaron updated this revision to Diff 461942.
Izaron added a comment.
Add helper method `DiagnoseLabelAtEndOfCompoundStatement`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134207/new/
https://reviews.llvm.org/D134207
Files:
aaron.ballman added inline comments.
Comment at: clang/lib/Parse/ParseStmt.cpp:948-956
+if (getLangOpts().CPlusPlus) {
+ Diag(Tok, getLangOpts().CPlusPlus2b
+? diag::warn_cxx20_compat_label_end_of_compound_statement
+:
Izaron updated this revision to Diff 461347.
Izaron added a comment.
Fix corresponding FixIt clang test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134207/new/
https://reviews.llvm.org/D134207
Files:
Izaron added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:298-299
"and have an empty entry in the selector">;
-def err_switch_label_end_of_compound_statement : Error<
- "label at end of switch compound statement: expected statement">;
def
Izaron created this revision.
Izaron added reviewers: clang-language-wg, aaron.ballman, cor3ntin.
Herald added a project: All.
Izaron requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Direct continuation of https://reviews.llvm.org/D133887