[cfe-commits] r141745 - in /cfe/trunk: lib/Sema/SemaObjCProperty.cpp test/SemaObjC/property-category-3.m test/SemaObjC/property-inherited.m
Fariborz Jahanian
fjahanian at apple.com
Tue Oct 11 17:00:57 PDT 2011
Author: fjahanian
Date: Tue Oct 11 19:00:57 2011
New Revision: 141745
URL: http://llvm.org/viewvc/llvm-project?rev=141745&view=rev
Log:
objc: note location of the previously declared
property in the diagnostic.
Modified:
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
cfe/trunk/test/SemaObjC/property-category-3.m
cfe/trunk/test/SemaObjC/property-inherited.m
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=141745&r1=141744&r2=141745&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Tue Oct 11 19:00:57 2011
@@ -936,9 +936,11 @@
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);
+ }
}
}
Modified: cfe/trunk/test/SemaObjC/property-category-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-category-3.m?rev=141745&r1=141744&r2=141745&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/property-category-3.m (original)
+++ cfe/trunk/test/SemaObjC/property-category-3.m Tue Oct 11 19:00:57 2011
@@ -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>
Modified: cfe/trunk/test/SemaObjC/property-inherited.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-inherited.m?rev=141745&r1=141744&r2=141745&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/property-inherited.m (original)
+++ cfe/trunk/test/SemaObjC/property-inherited.m Tue Oct 11 19:00:57 2011
@@ -21,7 +21,7 @@
id _delegate;
}
@property(nonatomic, assign) id<FooDelegate> delegate;
- at property(nonatomic, assign) id<BarDelegate> delegate2;
+ at 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;
- at property(assign) NSMutableData *p_data;
+ at property(assign) NSMutableData *p_data; // expected-note {{property declared here}}
@end
@interface Data : Base
More information about the cfe-commits
mailing list