Skip to content

Commit 5361e10

Browse files
[LifetimeSafety] Use StringMap::contains (NFC) (#167186)
Identified with readability-container-contains.
1 parent 3ce5df4 commit 5361e10

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Analysis/LifetimeSafety/Facts.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ llvm::StringMap<ProgramPoint> FactManager::getTestPoints() const {
6868
for (const Fact *F : BlockFacts) {
6969
if (const auto *TPF = F->getAs<TestPointFact>()) {
7070
StringRef PointName = TPF->getAnnotation();
71-
assert(AnnotationToPointMap.find(PointName) ==
72-
AnnotationToPointMap.end() &&
71+
assert(!AnnotationToPointMap.contains(PointName) &&
7372
"more than one test points with the same name");
7473
AnnotationToPointMap[PointName] = F;
7574
}

0 commit comments

Comments
 (0)