File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
clang/include/clang/Analysis/Analyses Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -118,14 +118,10 @@ class FunctionParmMutationAnalyzer {
118
118
static FunctionParmMutationAnalyzer *
119
119
getFunctionParmMutationAnalyzer (const FunctionDecl &Func, ASTContext &Context,
120
120
ExprMutationAnalyzer::Memoized &Memorized) {
121
- auto it = Memorized.FuncParmAnalyzer .find (&Func);
122
- if (it == Memorized.FuncParmAnalyzer .end ())
123
- it =
124
- Memorized.FuncParmAnalyzer
125
- .try_emplace (&Func, std::unique_ptr<FunctionParmMutationAnalyzer>(
126
- new FunctionParmMutationAnalyzer (
127
- Func, Context, Memorized)))
128
- .first ;
121
+ auto [it, Inserted] = Memorized.FuncParmAnalyzer .try_emplace (&Func);
122
+ if (Inserted)
123
+ it->second = std::unique_ptr<FunctionParmMutationAnalyzer>(
124
+ new FunctionParmMutationAnalyzer (Func, Context, Memorized));
129
125
return it->getSecond ().get ();
130
126
}
131
127
You can’t perform that action at this time.
0 commit comments