Skip to content

Commit 18d2539

Browse files
[StaticAnalyzer] Simplify code with DenseMap::operator[] (NFC) (#115116)
1 parent c4dfa03 commit 18d2539

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ class NonLocalizedStringBRVisitor final : public BugReporterVisitor {
131131

132132
#define NEW_RECEIVER(receiver) \
133133
llvm::DenseMap<Selector, uint8_t> &receiver##M = \
134-
UIMethods.insert({&Ctx.Idents.get(#receiver), \
135-
llvm::DenseMap<Selector, uint8_t>()}) \
136-
.first->second;
134+
UIMethods[&Ctx.Idents.get(#receiver)];
137135
#define ADD_NULLARY_METHOD(receiver, method, argument) \
138136
receiver##M.insert( \
139137
{Ctx.Selectors.getNullarySelector(&Ctx.Idents.get(#method)), argument});

0 commit comments

Comments
 (0)