forked from OSchip/llvm-project
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
This commit is contained in:
parent
5b1dbec1b4
commit
4eda2c0086
|
@ -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) {
|
||||
|
|
|
@ -151,7 +151,7 @@ int main (void) {
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
self.formatter = 0; // expected-warning {{property 'formatter' not found on object of type 'FMXBridgeFormatter *'; did you mean to access property cppFormatter?}}
|
||||
self.formatter = 0;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in New Issue