]> granicus.if.org Git - clang/commitdiff
Minor refactoring of my last patch.
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 11 Apr 2009 18:54:57 +0000 (18:54 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Sat, 11 Apr 2009 18:54:57 +0000 (18:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68870 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.cpp

index d705af1b33ac6612d5b7a0769144bb29c9f8f6ce..d62379e4ef63c0a7bede70fa074c330a791a6992 100644 (file)
@@ -626,8 +626,8 @@ CodeGenFunction::GenerateBlockFunction(const BlockExpr *BExpr,
   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();
   }