[PATCH] Refactor: Simplify boolean conditional return statements in llvm/lib/Bitcode/Reader
Filipe Cabecinhas
filcab+llvm.phabricator at gmail.com
Sun May 24 23:54:21 PDT 2015
LGTM
On Sunday, May 24, 2015, Richard <legalize at xmission.com> wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150524/4f6c64f4/attachment.html>
More information about the llvm-commits
mailing list