[PATCH] D155342: [clang][JumpDiagnostics] ignore non-asm goto target scopes
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 17 12:08:21 PDT 2023
nickdesaulniers added inline comments.
================
Comment at: clang/lib/Sema/JumpDiagnostics.cpp:361
+ if (!GS->isAsmGoto())
+ break;
// Remember both what scope a goto is in as well as the fact that we have
----------------
rjmccall wrote:
> You can pull the `GCCAsmStmtClass` case right above this, make the cast unconditional (`if (!cast<GCCAsmStmt>(S)->isAsmGoto()) break;`), and then fall through into the GotoStmt case.
I could hoist + use `[[fallthrough]]` but note that the case above `Stmt::SwitchStmtClass` also currently uses `[[fallthrough]]` here as well; so I would still need the `dyn_cast`.
With that in mind, do you still prefer the hoisting? I don't have a preference, but wanted to triple check that with you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155342/new/
https://reviews.llvm.org/D155342
More information about the cfe-commits
mailing list