diff options
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index d6e5732..cdf29ec 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -726,7 +726,7 @@ bool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input, if (Input.isBuffer()) { SourceMgr.setMainFileID(SourceMgr.createFileID( std::unique_ptr<llvm::MemoryBuffer>(Input.getBuffer()), Kind)); - assert(!SourceMgr.getMainFileID().isInvalid() && + assert(SourceMgr.getMainFileID().isValid() && "Couldn't establish MainFileID!"); return true; } @@ -777,7 +777,7 @@ bool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input, SourceMgr.overrideFileContents(File, std::move(SB)); } - assert(!SourceMgr.getMainFileID().isInvalid() && + assert(SourceMgr.getMainFileID().isValid() && "Couldn't establish MainFileID!"); return true; } @@ -1358,7 +1358,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, // If we've already handled this import, just return the cached result. // This one-element cache is important to eliminate redundant diagnostics // when both the preprocessor and parser see the same import declaration. - if (!ImportLoc.isInvalid() && LastModuleImportLoc == ImportLoc) { + if (ImportLoc.isValid() && LastModuleImportLoc == ImportLoc) { // Make the named module visible. if (LastModuleImportResult && ModuleName != getLangOpts().CurrentModule && ModuleName != getLangOpts().ImplementationOfModule) |