File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -4057,11 +4057,10 @@ TemplateDeductionResult Sema::FinishTemplateArgumentDeduction(
40574057 // keep track of these diagnostics. They'll be emitted if this specialization
40584058 // is actually used.
40594059 if (Info.diag_begin () != Info.diag_end ()) {
4060- SuppressedDiagnosticsMap::iterator
4061- Pos = SuppressedDiagnostics.find (Specialization->getCanonicalDecl ());
4062- if (Pos == SuppressedDiagnostics.end ())
4063- SuppressedDiagnostics[Specialization->getCanonicalDecl ()]
4064- .append (Info.diag_begin (), Info.diag_end ());
4060+ auto [Pos, Inserted] =
4061+ SuppressedDiagnostics.try_emplace (Specialization->getCanonicalDecl ());
4062+ if (Inserted)
4063+ Pos->second .append (Info.diag_begin (), Info.diag_end ());
40654064 }
40664065
40674066 return TemplateDeductionResult::Success;
You can’t perform that action at this time.
0 commit comments