[PATCH] D10016: Refactor: Simplify boolean conditional return statements in lib/Frontend

Richard via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 24 10:13:35 PDT 2015


LegalizeAdulthood updated this revision to Diff 38309.
LegalizeAdulthood added a comment.

Update to latest


http://reviews.llvm.org/D10016

Files:
  lib/Frontend/VerifyDiagnosticConsumer.cpp

Index: lib/Frontend/VerifyDiagnosticConsumer.cpp
===================================================================
--- lib/Frontend/VerifyDiagnosticConsumer.cpp
+++ lib/Frontend/VerifyDiagnosticConsumer.cpp
@@ -186,9 +186,7 @@
       Regex(RegexStr) { }
 
   bool isValid(std::string &Error) override {
-    if (Regex.isValid(Error))
-      return true;
-    return false;
+    return Regex.isValid(Error);
   }
 
   bool match(StringRef S) override {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10016.38309.patch
Type: text/x-patch
Size: 454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151024/25b71d40/attachment.bin>


More information about the cfe-commits mailing list