Skip to content

Commit 6bd488d

Browse files
[CodeGen] Use DenseMap::contains (NFC)
1 parent 51fb76f commit 6bd488d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/CodeGen/CoverageMappingGen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,8 @@ struct MCDCCoverageBuilder {
730730
return;
731731

732732
// If binary expression is disqualified, don't do mapping.
733-
if (NestLevel.empty() && MCDCBitmapMap.find(CodeGenFunction::stripCond(
734-
E)) == MCDCBitmapMap.end())
733+
if (NestLevel.empty() &&
734+
!MCDCBitmapMap.contains(CodeGenFunction::stripCond(E)))
735735
NotMapped = true;
736736

737737
// Push Stmt on 'NestLevel' stack to keep track of nest location.
@@ -744,7 +744,7 @@ struct MCDCCoverageBuilder {
744744
// If the operator itself has an assigned ID, this means it represents a
745745
// larger subtree. In this case, pop its ID out of the RHS stack and
746746
// assign that ID to its LHS node. Its RHS will receive a new ID.
747-
if (CondIDs.find(CodeGenFunction::stripCond(E)) != CondIDs.end()) {
747+
if (CondIDs.contains(CodeGenFunction::stripCond(E))) {
748748
// If Stmt has an ID, assign its ID to LHS
749749
CondIDs[CodeGenFunction::stripCond(E->getLHS())] = CondIDs[E];
750750

0 commit comments

Comments
 (0)