From 0e337543dcadb5baceec59c4f87f48cf204449bb Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 31 Aug 2012 20:04:47 +0000 Subject: objective-C ARC; detect and warn on retain cycle when property-dot syntax is used on an object whose capture causes retain cycle. // rdar://11702054 llvm-svn: 163017 --- clang/lib/Sema/SemaChecking.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/Sema/SemaChecking.cpp') diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 137f3e1a5e3..6d6461136b1 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -5253,6 +5253,12 @@ namespace { if (block->getBlockDecl()->capturesVariable(Variable)) Visit(block->getBlockDecl()->getBody()); } + + void VisitOpaqueValueExpr(OpaqueValueExpr *OVE) { + if (Capturer) return; + if (OVE->getSourceExpr()) + Visit(OVE->getSourceExpr()); + } }; } -- cgit v1.2.3