diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CoverageMappingGen.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 647cf0bd6a6..9e9963cd192 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1281,7 +1281,7 @@ bool CodeGenModule::isInSanitizerBlacklist(llvm::Function *Fn, if (SanitizerBL.isBlacklistedFunction(Fn->getName())) return true; // Blacklist by location. - if (!Loc.isInvalid()) + if (Loc.isValid()) return SanitizerBL.isBlacklistedLocation(Loc); // If location is unknown, this may be a compiler-generated function. Assume // it's located in the main file. diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp index 1c7656fa349..3561a57aae4 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.cpp +++ b/clang/lib/CodeGen/CoverageMappingGen.cpp @@ -163,7 +163,7 @@ public: unsigned Depth = 0; for (SourceLocation Parent = getIncludeOrExpansionLoc(Loc); - !Parent.isInvalid(); Parent = getIncludeOrExpansionLoc(Parent)) + Parent.isValid(); Parent = getIncludeOrExpansionLoc(Parent)) ++Depth; FileLocs.push_back(std::make_pair(Loc, Depth)); } @@ -569,7 +569,7 @@ struct CounterCoverageMappingBuilder } void VisitStmt(const Stmt *S) { - if (!S->getLocStart().isInvalid()) + if (S->getLocStart().isValid()) extendRegion(S); for (const Stmt *Child : S->children()) if (Child) |