[PATCH] D155336: [clang][JumpDiagnostics] bring VerifyIndirectOrAsmJumps to C++17
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 14 14:05:19 PDT 2023
nickdesaulniers planned changes to this revision.
nickdesaulniers added inline comments.
================
Comment at: clang/lib/Sema/JumpDiagnostics.cpp:740-741
unsigned IGScope = LabelAndGotoScopes[IG];
Stmt *&Entry = JumpScopesMap[IGScope];
if (!Entry) Entry = IG;
}
----------------
`contains`
================
Comment at: clang/lib/Sema/JumpDiagnostics.cpp:756-757
unsigned LabelScope = LabelAndGotoScopes[TheLabel->getStmt()];
LabelDecl *&Target = TargetScopes[LabelScope];
if (!Target) Target = TheLabel;
}
----------------
`contains`
================
Comment at: clang/lib/Sema/JumpDiagnostics.cpp:790
// reach this label scope.
- for (SmallVectorImpl<JumpScope>::iterator
- I = JumpScopes.begin(), E = JumpScopes.end(); I != E; ++I) {
- unsigned Scope = I->first;
-
+ for (auto [OriginalScope, Jump] : JumpScopes) {
+ unsigned Scope = OriginalScope;
----------------
`JumpScope` is probably a clearer identifier.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155336/new/
https://reviews.llvm.org/D155336
More information about the cfe-commits
mailing list