diff options
Diffstat (limited to 'clang/lib/Frontend/DiagnosticRenderer.cpp')
-rw-r--r-- | clang/lib/Frontend/DiagnosticRenderer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/DiagnosticRenderer.cpp b/clang/lib/Frontend/DiagnosticRenderer.cpp index 923d5e97c13..6ef9a89d86f 100644 --- a/clang/lib/Frontend/DiagnosticRenderer.cpp +++ b/clang/lib/Frontend/DiagnosticRenderer.cpp @@ -518,7 +518,7 @@ void DiagnosticRenderer::emitMacroExpansions(SourceLocation Loc, ArrayRef<CharSourceRange> Ranges, ArrayRef<FixItHint> Hints, const SourceManager &SM) { - assert(!Loc.isInvalid() && "must have a valid source location here"); + assert(Loc.isValid() && "must have a valid source location here"); // Produce a stack of macro backtraces. SmallVector<SourceLocation, 8> LocationStack; @@ -541,7 +541,7 @@ void DiagnosticRenderer::emitMacroExpansions(SourceLocation Loc, // backtraces. if (Loc.isFileID()) Loc = SM.getImmediateMacroCallerLoc(LocationStack.back()); - assert(!Loc.isInvalid() && "must have a valid source location here"); + assert(Loc.isValid() && "must have a valid source location here"); } LocationStack.erase(LocationStack.begin(), @@ -598,7 +598,7 @@ void DiagnosticNoteRenderer::emitImportLocation(SourceLocation Loc, SmallString<200> MessageStorage; llvm::raw_svector_ostream Message(MessageStorage); Message << "in module '" << ModuleName; - if (!PLoc.isInvalid()) + if (PLoc.isValid()) Message << "' imported from " << PLoc.getFilename() << ':' << PLoc.getLine(); Message << ":"; |