def err_c99_array_usage_cxx : Error<
"C99-specific array features are not permitted in C++">;
+def note_getter_unavailable : Note<
+ "or because setter is declared here, but no getter method %0 is found">;
def err_invalid_protocol_qualifiers : Error<
"invalid protocol qualifiers on non-ObjC type">;
def warn_ivar_use_hidden : Warning<
return LookupMemberExpr(Res, BaseExpr, IsArrow, OpLoc, SS,
ObjCImpDecl);
}
-
- return ExprError(Diag(MemberLoc, diag::err_property_not_found)
- << MemberName << BaseType);
+ Diag(MemberLoc, diag::err_property_not_found)
+ << MemberName << BaseType;
+ if (Setter && !Getter)
+ Diag(Setter->getLocation(), diag::note_getter_unavailable)
+ << MemberName << BaseExpr->getSourceRange();
+ return ExprError();
}
// Handle the following exceptional case (*Obj).isa.
return Owned(new (Context) ExtVectorElementExpr(ret, BaseExpr, *Member,
MemberLoc));
}
-
+
Diag(MemberLoc, diag::err_typecheck_member_reference_struct_union)
<< BaseType << BaseExpr->getSourceRange();
{
int setterOnly;
}
-- (void) setSetterOnly:(int)value;
+- (void) setSetterOnly:(int)value; // expected-note {{or because setter is declared here, but no getter method 'setterOnly' is found}}
@end
@implementation Subclass
@interface C {}
// - (int)Foo;
-- (void)setFoo:(int)value;
+- (void)setFoo:(int)value; // expected-note 2 {{or because setter is declared here, but no getter method 'Foo' is found}}
@end
void g(int);