Skip to content

Commit

Permalink
Refactor: simplify boolean conditional return statements in lib/Analysis
Browse files Browse the repository at this point in the history
Patch by Richard Thomson!

Differential revision: http://reviews.llvm.org/D10008

llvm-svn: 252256
  • Loading branch information
alexfh committed Nov 6, 2015
1 parent f477585 commit 090360d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions clang/lib/Analysis/BodyFarm.cpp
Expand Up @@ -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 {
Expand Down

0 comments on commit 090360d

Please sign in to comment.