r252256 - Refactor: simplify boolean conditional return statements in lib/Analysis
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 17:08:38 PST 2015
Author: alexfh
Date: Thu Nov 5 19:08:38 2015
New Revision: 252256
URL: http://llvm.org/viewvc/llvm-project?rev=252256&view=rev
Log:
Refactor: simplify boolean conditional return statements in lib/Analysis
Patch by Richard Thomson!
Differential revision: http://reviews.llvm.org/D10008
Modified:
cfe/trunk/lib/Analysis/BodyFarm.cpp
Modified: cfe/trunk/lib/Analysis/BodyFarm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BodyFarm.cpp?rev=252256&r1=252255&r2=252256&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/BodyFarm.cpp (original)
+++ cfe/trunk/lib/Analysis/BodyFarm.cpp Thu Nov 5 19:08:38 2015
@@ -36,10 +36,7 @@ static bool isDispatchBlock(QualType Ty)
// 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 {
More information about the cfe-commits
mailing list