forked from OSchip/llvm-project
objc: note location of the previously declared
property in the diagnostic. llvm-svn: 141745
This commit is contained in:
parent
f192ca0761
commit
fa643c8f3b
|
@ -936,9 +936,11 @@ Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property,
|
|||
QualType ConvertedType;
|
||||
if (!isObjCPointerConversion(RHSType, LHSType,
|
||||
ConvertedType, IncompatibleObjC) ||
|
||||
IncompatibleObjC)
|
||||
IncompatibleObjC) {
|
||||
Diag(Property->getLocation(), diag::warn_property_types_are_incompatible)
|
||||
<< Property->getType() << SuperProperty->getType() << inheritedName;
|
||||
Diag(SuperProperty->getLocation(), diag::note_property_declare);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
|
||||
@protocol P
|
||||
@property(readonly) int X;
|
||||
@property(readonly) int X; // expected-note {{property declared here}}
|
||||
@end
|
||||
|
||||
@protocol P1<P>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
id _delegate;
|
||||
}
|
||||
@property(nonatomic, assign) id<FooDelegate> delegate;
|
||||
@property(nonatomic, assign) id<BarDelegate> delegate2;
|
||||
@property(nonatomic, assign) id<BarDelegate> delegate2; // expected-note {{property declared here}}
|
||||
@end
|
||||
@interface Bar : Foo {
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
|||
@interface Base : NSData
|
||||
@property(assign) id ref;
|
||||
@property(assign) Base *p_base;
|
||||
@property(assign) NSMutableData *p_data;
|
||||
@property(assign) NSMutableData *p_data; // expected-note {{property declared here}}
|
||||
@end
|
||||
|
||||
@interface Data : Base
|
||||
|
|
Loading…
Reference in New Issue