diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-31 20:04:47 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-31 20:04:47 +0000 |
commit | 7e2e4c33cdd347d0f3faac3e391245d06fa42811 (patch) | |
tree | ccab696464b556c838b8a75813d952441f8a1550 /lib/Sema/SemaChecking.cpp | |
parent | 6666ed4ed2e2bc13da5ac5d0a4947019137d45be (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 137f3e1a5e..6d6461136b 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/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()); + } }; } |