diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp index b245abd16c3f4..916016601a932 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.cpp +++ b/clang/lib/CodeGen/CoverageMappingGen.cpp @@ -730,8 +730,8 @@ struct MCDCCoverageBuilder { return; // If binary expression is disqualified, don't do mapping. - if (NestLevel.empty() && MCDCBitmapMap.find(CodeGenFunction::stripCond( - E)) == MCDCBitmapMap.end()) + if (NestLevel.empty() && + !MCDCBitmapMap.contains(CodeGenFunction::stripCond(E))) NotMapped = true; // Push Stmt on 'NestLevel' stack to keep track of nest location. @@ -744,7 +744,7 @@ struct MCDCCoverageBuilder { // If the operator itself has an assigned ID, this means it represents a // larger subtree. In this case, pop its ID out of the RHS stack and // assign that ID to its LHS node. Its RHS will receive a new ID. - if (CondIDs.find(CodeGenFunction::stripCond(E)) != CondIDs.end()) { + if (CondIDs.contains(CodeGenFunction::stripCond(E))) { // If Stmt has an ID, assign its ID to LHS CondIDs[CodeGenFunction::stripCond(E->getLHS())] = CondIDs[E];