Skip to content

Commit f6f0526

Browse files
[Sema] Avoid repeated hash lookups (NFC) (#126428)
1 parent 3ce96b9 commit f6f0526

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Sema/JumpDiagnostics.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,7 @@ void JumpScopeChecker::VerifyIndirectJumps() {
786786
if (CHECK_PERMISSIVE(!LabelAndGotoScopes.count(TheLabel->getStmt())))
787787
continue;
788788
unsigned LabelScope = LabelAndGotoScopes[TheLabel->getStmt()];
789-
if (!TargetScopes.contains(LabelScope))
790-
TargetScopes[LabelScope] = TheLabel;
789+
TargetScopes.try_emplace(LabelScope, TheLabel);
791790
}
792791

793792
// For each target scope, make sure it's trivially reachable from

0 commit comments

Comments
 (0)