diff options
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index aa9d6947cbb..f4802792573 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2248,15 +2248,7 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S, return ExprError(); MarkAnyDeclReferenced(Loc, IV, true); - if (!IV->getBackingIvarReferencedInAccessor()) { - // Mark this ivar 'referenced' in this method, if it is a backing ivar - // of a property and current method is one of its property accessor. - const ObjCPropertyDecl *PDecl; - const ObjCIvarDecl *BIV = GetIvarBackingPropertyAccessor(CurMethod, PDecl); - if (BIV && BIV == IV) - IV->setBackingIvarReferencedInAccessor(true); - } - + ObjCMethodFamily MF = CurMethod->getMethodFamily(); if (MF != OMF_init && MF != OMF_dealloc && MF != OMF_finalize && !IvarBacksCurrentMethodAccessor(IFace, CurMethod, IV)) |