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(
4057
4057
// keep track of these diagnostics. They'll be emitted if this specialization
4058
4058
// is actually used.
4059
4059
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 ());
4065
4064
}
4066
4065
4067
4066
return TemplateDeductionResult::Success;
You can’t perform that action at this time.
0 commit comments