[PATCH] Refactor: Simplify boolean conditional return statements in lib/Basic
Richard
legalize at xmission.com
Mon May 25 13:26:16 PDT 2015
diff -U9999
http://reviews.llvm.org/D10011
Files:
lib/Basic/DiagnosticIDs.cpp
lib/Basic/VirtualFileSystem.cpp
Index: lib/Basic/DiagnosticIDs.cpp
===================================================================
--- lib/Basic/DiagnosticIDs.cpp
+++ lib/Basic/DiagnosticIDs.cpp
@@ -709,10 +709,7 @@
return false;
// Currently we consider all ARC errors as recoverable.
- if (isARCDiagnostic(DiagID))
- return false;
-
- return true;
+ return !isARCDiagnostic(DiagID);
}
bool DiagnosticIDs::isARCDiagnostic(unsigned DiagID) {
Index: lib/Basic/VirtualFileSystem.cpp
===================================================================
--- lib/Basic/VirtualFileSystem.cpp
+++ lib/Basic/VirtualFileSystem.cpp
@@ -838,9 +838,7 @@
if (Stream.failed())
return false;
- if (!checkMissingKeys(Top, Keys))
- return false;
- return true;
+ return checkMissingKeys(Top, Keys);
}
};
} // end of anonymous namespace
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10011.26485.patch
Type: text/x-patch
Size: 843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150525/246ec0dc/attachment.bin>
More information about the cfe-commits
mailing list