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

Richard legalize at xmission.com
Sun May 24 23:40:21 PDT 2015


Hi dexonsmith, void, sunfish, rafael, resistor,

Use clang-tidy to simplify boolean conditional return statements.

http://reviews.llvm.org/D9968

Files:
  lib/AsmParser/LLParser.cpp

Index: lib/AsmParser/LLParser.cpp
===================================================================
--- lib/AsmParser/LLParser.cpp
+++ lib/AsmParser/LLParser.cpp
@@ -564,10 +564,7 @@
       NMD->addOperand(N);
     } while (EatIfPresent(lltok::comma));
 
-  if (ParseToken(lltok::rbrace, "expected end of metadata node"))
-    return true;
-
-  return false;
+  return ParseToken(lltok::rbrace, "expected end of metadata node");
 }
 
 /// ParseStandaloneMetadata:

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


More information about the llvm-commits mailing list