================
@@ -482,13 +483,18 @@ class ASTWalker : public RecursiveASTVisitor<ASTWalker> {
   bool VisitCastExpr(CastExpr *E) {
     // Handle implicit or explicit casts between Objective-C object pointers
     // aimed towards protocol-qualification (e.g., `ClassName *` to
-    // `id<Proto>`).
+    // `id<Proto>`), as well as toll-free bridged C-pointer-to-ObjC casts.
     QualType SourceType = E->getSubExpr()->getType();
     QualType DestType = E->getType();
 
     const auto *SrcPtr = SourceType->getAs<ObjCObjectPointerType>();
     const auto *DestPtr = DestType->getAs<ObjCObjectPointerType>();
 
+    if (E->getCastKind() == CK_CPointerToObjCPointerCast) {
----------------
dmaclach wrote:

Yes.. was missing this test (didn't get copied across).  Added the test and 
updated the comment.

https://github.com/llvm/llvm-project/pull/216158
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to