diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2015-10-03 10:46:20 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2015-10-03 10:46:20 +0000 |
commit | 4d9c4a9b2346f522d08b3bada0dee8308be430a1 (patch) | |
tree | b579ce28651fed751895d934fcd0bc9f84695bf8 /lib/ARCMigrate/ObjCMT.cpp | |
parent | 6f9ac26e2fa7d29587e1009ed458a11e54ac40a2 (diff) |
Replace double negation of !FileID.isInvalid() with FileID.isValid().
+couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate/ObjCMT.cpp')
-rw-r--r-- | lib/ARCMigrate/ObjCMT.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp index 1747dca066..04fa7bfb94 100644 --- a/lib/ARCMigrate/ObjCMT.cpp +++ b/lib/ARCMigrate/ObjCMT.cpp @@ -1805,7 +1805,7 @@ private: FileID FID; unsigned Offset; std::tie(FID, Offset) = SourceMgr.getDecomposedLoc(Loc); - assert(!FID.isInvalid()); + assert(FID.isValid()); SmallString<200> Path = StringRef(SourceMgr.getFileEntryForID(FID)->getName()); llvm::sys::fs::make_absolute(Path); @@ -1862,8 +1862,8 @@ void ObjCMigrateASTConsumer::HandleTranslationUnit(ASTContext &Ctx) { for (DeclContext::decl_iterator D = TU->decls_begin(), DEnd = TU->decls_end(); D != DEnd; ++D) { FileID FID = PP.getSourceManager().getFileID((*D)->getLocation()); - if (!FID.isInvalid()) - if (!FileId.isInvalid() && FileId != FID) { + if (FID.isValid()) + if (FileId.isValid() && FileId != FID) { if (ASTMigrateActions & FrontendOptions::ObjCMT_Annotation) AnnotateImplicitBridging(Ctx); } |