diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-12-11 22:40:48 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-12-11 22:40:48 +0000 |
commit | 3b27f1a80e4e433b503efd344c909eeafaa9033c (patch) | |
tree | 43e9035128c7ba4217be1db5e2a63febd96eb966 /lib/Sema | |
parent | 2108577809989bd5c591128b48aac6715b3f61b6 (diff) |
Patch to allow C-style cast from 'void *' to block pointer type.
(fixes radar 7465023).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaCXXCast.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp index 857241d714..814af9080d 100644 --- a/lib/Sema/SemaCXXCast.cpp +++ b/lib/Sema/SemaCXXCast.cpp @@ -545,6 +545,11 @@ static TryCastResult TryStaticCast(Sema &Self, Expr *&SrcExpr, Kind = CastExpr::CK_AnyPointerToObjCPointerCast; return TC_Success; } + else if (CStyle && DestType->isBlockPointerType()) { + // allow c-style cast of void * to block pointers. + Kind = CastExpr::CK_AnyPointerToBlockPointerCast; + return TC_Success; + } } } |