[PATCH] Refactor: Simplify boolean conditional return statements in modularize

Richard legalize at xmission.com
Mon May 25 15:35:35 PDT 2015


Hi alexfh,

Use clang-tidy to simplify conditional return statements

http://reviews.llvm.org/D10027

Files:
  modularize/ModularizeUtilities.cpp

Index: modularize/ModularizeUtilities.cpp
===================================================================
--- modularize/ModularizeUtilities.cpp
+++ modularize/ModularizeUtilities.cpp
@@ -388,9 +388,7 @@
     return false;
   if (Extension.equals_lower(".h"))
     return true;
-  if (Extension.equals_lower(".inc"))
-    return true;
-  return false;
+  return Extension.equals_lower(".inc");
 }
 
 // Get directory path component from file path.

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10027.26498.patch
Type: text/x-patch
Size: 452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150525/a43ead24/attachment.bin>


More information about the cfe-commits mailing list