diff --git a/clang/lib/Sema/JumpDiagnostics.cpp b/clang/lib/Sema/JumpDiagnostics.cpp index 4b92d67e49d7d..ffbb9bc0bfe7c 100644 --- a/clang/lib/Sema/JumpDiagnostics.cpp +++ b/clang/lib/Sema/JumpDiagnostics.cpp @@ -786,8 +786,7 @@ void JumpScopeChecker::VerifyIndirectJumps() { if (CHECK_PERMISSIVE(!LabelAndGotoScopes.count(TheLabel->getStmt()))) continue; unsigned LabelScope = LabelAndGotoScopes[TheLabel->getStmt()]; - if (!TargetScopes.contains(LabelScope)) - TargetScopes[LabelScope] = TheLabel; + TargetScopes.try_emplace(LabelScope, TheLabel); } // For each target scope, make sure it's trivially reachable from