[PATCH] Refactor: Simplify boolean conditional return statements in llvm/lib/Bitcode/Reader

Richard legalize at xmission.com
Sun May 24 23:43:25 PDT 2015


Hi rafael, dexonsmith, void, sunfish, krememek, filcab, resistor, dblaikie,

Use clang-tidy to simplify boolean conditional return statements.

http://reviews.llvm.org/D9969

Files:
  lib/Bitcode/Reader/BitstreamReader.cpp

Index: lib/Bitcode/Reader/BitstreamReader.cpp
===================================================================
--- lib/Bitcode/Reader/BitstreamReader.cpp
+++ lib/Bitcode/Reader/BitstreamReader.cpp
@@ -48,10 +48,7 @@
   if (NumWordsP) *NumWordsP = NumWords;
 
   // Validate that this block is sane.
-  if (CurCodeSize == 0 || AtEndOfStream())
-    return true;
-
-  return false;
+  return CurCodeSize == 0 || AtEndOfStream();
 }
 
 static uint64_t readAbbreviatedField(BitstreamCursor &Cursor,

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


More information about the llvm-commits mailing list