diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-08-15 17:39:00 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-08-15 17:39:00 +0000 |
commit | 4eda2c00861cfdbc20b64b623a8fa32f03cbe699 (patch) | |
tree | 1ab0175ef6c20ff769dd82c18b81deb225e6497e /clang/lib | |
parent | 5b1dbec1b4eda05de01b0c1702eabbe1a025bb8a (diff) | |
download | bcm5719-llvm-4eda2c00861cfdbc20b64b623a8fa32f03cbe699.tar.gz bcm5719-llvm-4eda2c00861cfdbc20b64b623a8fa32f03cbe699.zip |
Objective-C. Do not warn if user is using property-dox syntax to name a
user provided setter name (as declared in @property attribute declaration).
rdar://18022762
llvm-svn: 215736
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index 0facca03915..39598b5a19a 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -1708,11 +1708,15 @@ HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, // name 'x'. if (Setter && Setter->isImplicit() && Setter->isPropertyAccessor() && !IFace->FindPropertyDeclaration(Member)) { - if (const ObjCPropertyDecl *PDecl = Setter->findPropertyDecl()) + if (const ObjCPropertyDecl *PDecl = Setter->findPropertyDecl()) { + // Do not warn if user is using property-dot syntax to make call to + // user named setter. + if (!(PDecl->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_setter)) Diag(MemberLoc, diag::warn_property_access_suggest) << MemberName << QualType(OPT, 0) << PDecl->getName() << FixItHint::CreateReplacement(MemberLoc, PDecl->getName()); + } } if (Getter || Setter) { |