[PATCH] Refactor: simplify boolean conditional return statements in lib/Analysis
Aaron Ballman
aaron.ballman at gmail.com
Tue May 26 06:14:43 PDT 2015
LGTM!
~Aaron
On Mon, May 25, 2015 at 4:26 PM, Richard <legalize at xmission.com> wrote:
> diff -U9999
>
>
> http://reviews.llvm.org/D10008
>
> Files:
> lib/Analysis/BodyFarm.cpp
>
> Index: lib/Analysis/BodyFarm.cpp
> ===================================================================
> --- lib/Analysis/BodyFarm.cpp
> +++ lib/Analysis/BodyFarm.cpp
> @@ -36,10 +36,7 @@
> // returns void.
> const FunctionProtoType *FT =
> BPT->getPointeeType()->getAs<FunctionProtoType>();
> - if (!FT || !FT->getReturnType()->isVoidType() || FT->getNumParams() != 0)
> - return false;
> -
> - return true;
> + return FT && FT->getReturnType()->isVoidType() && FT->getNumParams() == 0;
> }
>
> namespace {
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list