diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-01-22 19:02:20 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-01-22 19:02:20 +0000 |
commit | dad963039874d88f0adc6889b64283fe5d1c94c6 (patch) | |
tree | 90d902470f98c39260a97fcb55c1cdfcfef99552 /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | fb5c21a70ba0d5dde85b8de9ae0ceb579ca46b52 (diff) | |
download | bcm5719-llvm-dad963039874d88f0adc6889b64283fe5d1c94c6.tar.gz bcm5719-llvm-dad963039874d88f0adc6889b64283fe5d1c94c6.zip |
ObjectiveC. When issuing property implementation is
not using backing ivar warning, ignore when
property is not being synthesized (user declared its
implementation @dynamic). // rdar://1583425
llvm-svn: 199820
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index f7f1b4b5653..78c26d38a9f 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -3514,6 +3514,13 @@ void Sema::DiagnoseUnusedBackingIvarInAccessor(Scope *S, const ObjCIvarDecl *IV = GetIvarBackingPropertyAccessor(CurMethod, PDecl); if (!IV) continue; + // Property declared as @dynamic must be ignored. + if (ObjCPropertyImplDecl *PropertyImpDecl = + Context.getObjCPropertyImplDeclForPropertyDecl(PDecl, ImplD)) + if (PropertyImpDecl->getPropertyImplementation() == + ObjCPropertyImplDecl::Dynamic) + continue; + UnusedBackingIvarChecker Checker(*this, CurMethod, IV); Checker.TraverseStmt(CurMethod->getBody()); |