diff options
Diffstat (limited to 'lib/Sema/SemaCXXCast.cpp')
-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; + } } } |