aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-10-03 10:46:20 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-10-03 10:46:20 +0000
commit8b563665c3dc7f3e11b824a58c9676c2a1469aeb (patch)
tree8788285307e06404f6358197bb236c46c88af376 /clang/lib/Frontend/CompilerInstance.cpp
parent2c86fb4bdeb3f63b0c4fff2b9408cbe9fdc0731f (diff)
downloadllvm-8b563665c3dc7f3e11b824a58c9676c2a1469aeb.zip
llvm-8b563665c3dc7f3e11b824a58c9676c2a1469aeb.tar.gz
llvm-8b563665c3dc7f3e11b824a58c9676c2a1469aeb.tar.bz2
Replace double negation of !FileID.isInvalid() with FileID.isValid().
+couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp6
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)