diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-01-21 00:05:09 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-01-21 00:05:09 +0000 |
commit | f7c43fdd28d4963a16291cb6b000ed955f044262 (patch) | |
tree | 7b5d354e28a1e329e5f2588e5f8e3ec9e527f966 /lib/Sema/SemaOverload.cpp | |
parent | b2cd48756119f4d8d2a865b4b3e0e8efd02e26a0 (diff) |
Also allow cast of block pointer type to
pointer to an any object. Another variation of
radar 7562285.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index e9b6072adc..7b0c98c569 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -1151,6 +1151,13 @@ bool Sema::isObjCPointerConversion(QualType FromType, QualType ToType, } ToPointeeType = ToBlockPtr->getPointeeType(); } + else if (FromType->getAs<BlockPointerType>() && + ToObjCPtr && ToObjCPtr->isObjCBuiltinType()) { + // Objective C++: We're able to convert from a block pointer type to a + // pointer to an any object. + ConvertedType = ToType; + return true; + } else return false; |