[PATCH] D155342: [clang][JumpDiagnostics] ignore non-asm goto target scopes

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 18 10:51:39 PDT 2023


rjmccall added inline comments.


================
Comment at: clang/lib/Sema/JumpDiagnostics.cpp:658
 
+    if (auto *G = dyn_cast<GCCAsmStmt>(Jump)) {
+      for (AddrLabelExpr *L : G->labels()) {
----------------
I think it would be good to leave a comment here like this:

> We know the possible destinations of an asm goto, but we don't have the
> ability to add code along those control flow edges, so we have to diagnose
> jumps both in and out of scopes, just like we do with an indirect goto.


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