summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-08-15 17:39:00 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-08-15 17:39:00 +0000
commit4eda2c00861cfdbc20b64b623a8fa32f03cbe699 (patch)
tree1ab0175ef6c20ff769dd82c18b81deb225e6497e /clang/lib
parent5b1dbec1b4eda05de01b0c1702eabbe1a025bb8a (diff)
downloadbcm5719-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.cpp6
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) {
OpenPOWER on IntegriCloud