Skip to content

Commit 66f846d

Browse files
[Sema] Avoid repeated hash lookups (NFC) (#110951)
1 parent 20d402a commit 66f846d

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
@@ -761,8 +761,7 @@ void JumpScopeChecker::VerifyIndirectJumps() {
761761
if (CHECK_PERMISSIVE(!LabelAndGotoScopes.count(IG)))
762762
continue;
763763
unsigned IGScope = LabelAndGotoScopes[IG];
764-
if (!JumpScopesMap.contains(IGScope))
765-
JumpScopesMap[IGScope] = IG;
764+
JumpScopesMap.try_emplace(IGScope, IG);
766765
}
767766
JumpScopes.reserve(JumpScopesMap.size());
768767
for (auto &Pair : JumpScopesMap)

0 commit comments

Comments
 (0)