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


rjmccall added a comment.

Yes, this diagnostic implements a core semantic rule and must be emitted.  There are some situations where Clang will actually generate malformed IR (violating dominance rules) if you fail to diagnose jump violations correctly.  The IR you get when there's a jump over a destructor is well-formed, but it's still arguably* a miscompile and must be diagnosed.

(*) It's a miscompile unless there's a rule saying it's U.B. to jump out of a scope.  I don't see such a rule in any of the docs about this feature.


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