[PATCH] D10008: Refactor: simplify boolean conditional return statements in lib/Analysis

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 5 17:11:07 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL252256: Refactor: simplify boolean conditional return statements in lib/Analysis (authored by alexfh).

Changed prior to commit:
  http://reviews.llvm.org/D10008?vs=26486&id=39448#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D10008

Files:
  cfe/trunk/lib/Analysis/BodyFarm.cpp

Index: cfe/trunk/lib/Analysis/BodyFarm.cpp
===================================================================
--- cfe/trunk/lib/Analysis/BodyFarm.cpp
+++ cfe/trunk/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 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10008.39448.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151106/1668f674/attachment.bin>


More information about the cfe-commits mailing list