Minor refactoring of my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68870 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index d705af1..d62379e 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -626,8 +626,8 @@
   const FunctionType *BlockFunctionType = BExpr->getFunctionType();
   QualType ResultType;
   bool IsVariadic;
-  if (!isa<FunctionNoProtoType>(BlockFunctionType)) {
-    const FunctionProtoType *FTy = cast<FunctionProtoType>(BlockFunctionType);
+  if (const FunctionProtoType *FTy = 
+      dyn_cast<FunctionProtoType>(BlockFunctionType)) {
     ResultType = FTy->getResultType();
     IsVariadic = FTy->isVariadic();
   }