[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 09:58:06 PDT 2023


nickdesaulniers planned changes to this revision.
nickdesaulniers added a comment.

In D155342#4504812 <https://reviews.llvm.org/D155342#4504812>, @rjmccall wrote:

> Wait, the whole point of this algorithm is that we have to do this whole complicated linear check against every label whose address is taken because we don't know where it's going.  If we have a list of all the possible labels that the `asm goto` might jump to, why are we building a map of all the labels and then filtering out the ones that aren't listed?  We should just be checking the listed destinations with the stricter triviality rule that indirect-goto uses.

Great point. Looks like I should probably be calling `CheckJump` from `JumpScopeChecker::VerifyJumps` instead.  Let me work on that refactoring instead.


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