summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-06-04 19:02:56 +0000
committerJohn McCall <rjmccall@apple.com>2010-06-04 19:02:56 +0000
commit8e346702b6f7d628ad1bf5fc3e8cdc697b08a9b7 (patch)
tree1ccc3b8eecb54ecb9db1daf2f2f6c544d618e8a0 /clang/lib/AST
parent7f3d95054b492fbf6ebc22f7db32fb1574f25e6c (diff)
downloadbcm5719-llvm-8e346702b6f7d628ad1bf5fc3e8cdc697b08a9b7.tar.gz
bcm5719-llvm-8e346702b6f7d628ad1bf5fc3e8cdc697b08a9b7.zip
Preserve more information from a block's original function declarator, if one
was given. Remove some unnecessary accounting from BlockScopeInfo. Handle typedef'ed function types until such time as we decide not. llvm-svn: 105478
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index a3f1b4455e9..43bf21313f6 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -3147,7 +3147,7 @@ void ASTContext::getObjCEncodingForBlock(const BlockExpr *Expr,
QualType BlockTy =
Expr->getType()->getAs<BlockPointerType>()->getPointeeType();
// Encode result type.
- getObjCEncodingForType(cast<FunctionType>(BlockTy)->getResultType(), S);
+ getObjCEncodingForType(BlockTy->getAs<FunctionType>()->getResultType(), S);
// Compute size of all parameters.
// Start with computing size of a pointer in number of bytes.
// FIXME: There might(should) be a better way of doing this computation!
OpenPOWER on IntegriCloud