summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCXXCast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaCXXCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCXXCast.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaCXXCast.cpp b/clang/lib/Sema/SemaCXXCast.cpp
index 857241d7148..814af9080d8 100644
--- a/clang/lib/Sema/SemaCXXCast.cpp
+++ b/clang/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;
+ }
}
}
OpenPOWER on IntegriCloud