aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-10-30 19:00:19 -0700
committerKazu Hirata <kazu@google.com>2021-10-30 19:00:19 -0700
commit4db2e4cebe9c542b58aee26c556c84bd12aa6780 (patch)
treea50bed3c6716f91153805f1d2908ba8361227049 /clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
parent213666f8044990bbf2999c2dc839b6c984e5616b (diff)
downloadllvm-4db2e4cebe9c542b58aee26c556c84bd12aa6780.zip
llvm-4db2e4cebe9c542b58aee26c556c84bd12aa6780.tar.gz
llvm-4db2e4cebe9c542b58aee26c556c84bd12aa6780.tar.bz2
Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC)
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
index 94ab9ad..b57c5dc 100644
--- a/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
@@ -949,7 +949,7 @@ void NonLocalizedStringChecker::checkPostCall(const CallEvent &Call,
const IdentifierInfo *Identifier = Call.getCalleeIdentifier();
SVal sv = Call.getReturnValue();
- if (isAnnotatedAsReturningLocalized(D) || LSF.count(Identifier) != 0) {
+ if (isAnnotatedAsReturningLocalized(D) || LSF.contains(Identifier)) {
setLocalizedState(sv, C);
} else if (isNSStringType(RT, C.getASTContext()) &&
!hasLocalizedState(sv, C)) {