diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-02-18 20:31:02 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-02-18 20:31:02 +0000 |
commit | b372b0ff1f1a0c6814163e0fe2f22f343bac87a8 (patch) | |
tree | 1d5a559aaffaa0d60593b74091158c6465ce587d /lib | |
parent | b9c8a24d04d5e5b3107656d8e03e21d3816c081e (diff) |
Fixed a crash specific to blocks in c++ uncovered by an internal
test suite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 4098d0f2cf..3cbba8c9ff 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -2221,7 +2221,9 @@ Sema::OwningExprResult Sema::MaybeBindToTemporary(Expr *E) { QualType Ty = CE->getCallee()->getType(); if (const PointerType *PT = Ty->getAs<PointerType>()) Ty = PT->getPointeeType(); - + else if (const BlockPointerType *BPT = Ty->getAs<BlockPointerType>()) + Ty = BPT->getPointeeType(); + const FunctionType *FTy = Ty->getAs<FunctionType>(); if (FTy->getResultType()->isReferenceType()) return Owned(E); |