[PATCH] Refactor: Simplify boolean conditional return statements in tools/yaml2obj

Richard legalize at xmission.com
Mon May 25 12:04:55 PDT 2015


Hi silvas, atanasyan, rafael, majnemer, chapuni,

Use clang-tidy to simplify boolean conditional return statements

http://reviews.llvm.org/D10007

Files:
  tools/yaml2obj/yaml2coff.cpp

Index: tools/yaml2obj/yaml2coff.cpp
===================================================================
--- tools/yaml2obj/yaml2coff.cpp
+++ tools/yaml2obj/yaml2coff.cpp
@@ -114,9 +114,7 @@
   bool parse() {
     if (!parseSections())
       return false;
-    if (!parseSymbols())
-      return false;
-    return true;
+    return parseSymbols();
   }
 
   unsigned getStringIndex(StringRef Str) {

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


More information about the llvm-commits mailing list