diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-10 22:08:23 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-10 22:08:23 +0000 |
| commit | c985a7f6df374f0b6a31f8415002d18e9638db60 (patch) | |
| tree | b8d977c8aa5bc2f23801d2354b2218a9663d252e | |
| parent | 8a584bb3d7a0c4cc15f1cf4a457f30ba96e355f8 (diff) | |
| download | bcm5719-llvm-c985a7f6df374f0b6a31f8415002d18e9638db60.tar.gz bcm5719-llvm-c985a7f6df374f0b6a31f8415002d18e9638db60.zip | |
Objective-C [qoi]. When reporting that a property is not
auto synthesized because it is synthesized in its super
class. locate property declaration in super class
which will default synthesize the property. rdar://18488727
llvm-svn: 219535
| -rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 1 | ||||
| -rw-r--r-- | clang/test/SemaObjC/attr-deprecated.m | 3 | ||||
| -rw-r--r-- | clang/test/SemaObjC/default-synthesize-1.m | 2 | ||||
| -rw-r--r-- | clang/test/SemaObjC/default-synthesize-3.m | 8 | ||||
| -rw-r--r-- | clang/test/SemaObjC/protocols-suppress-conformance.m | 2 | ||||
| -rw-r--r-- | clang/test/SemaObjC/super-property-notation.m | 2 |
6 files changed, 10 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index cf9010f7fe0..48aa18cd307 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -1584,6 +1584,7 @@ void Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl* IMPDecl, else { Diag(Prop->getLocation(), diag::warn_autosynthesis_property_in_superclass) << Prop->getIdentifier(); + Diag(PropInSuperClass->getLocation(), diag::note_property_declare); Diag(IMPDecl->getLocation(), diag::note_while_in_implementation); } continue; diff --git a/clang/test/SemaObjC/attr-deprecated.m b/clang/test/SemaObjC/attr-deprecated.m index 3e9157d0961..4eb56ee7d74 100644 --- a/clang/test/SemaObjC/attr-deprecated.m +++ b/clang/test/SemaObjC/attr-deprecated.m @@ -197,7 +197,8 @@ __attribute__((deprecated)) @interface TestBase @property (nonatomic, strong) id object __attribute__((deprecated("deprecated"))); // expected-note {{'object' has been explicitly marked deprecated here}} \ expected-note {{property 'object' is declared deprecated here}} \ -expected-note {{'setObject:' has been explicitly marked deprecated here}} +expected-note {{'setObject:' has been explicitly marked deprecated here}} \ +expected-note {{property declared here}} @end @interface TestDerived : TestBase diff --git a/clang/test/SemaObjC/default-synthesize-1.m b/clang/test/SemaObjC/default-synthesize-1.m index 2a34a65a957..731aa863e10 100644 --- a/clang/test/SemaObjC/default-synthesize-1.m +++ b/clang/test/SemaObjC/default-synthesize-1.m @@ -127,7 +127,7 @@ // rdar://17774815 @interface ZXParsedResult -@property (nonatomic, copy, readonly) NSString *description; +@property (nonatomic, copy, readonly) NSString *description; // expected-note {{property declared here}} @end @interface ZXCalendarParsedResult : ZXParsedResult diff --git a/clang/test/SemaObjC/default-synthesize-3.m b/clang/test/SemaObjC/default-synthesize-3.m index 879335e26be..dce9edabb90 100644 --- a/clang/test/SemaObjC/default-synthesize-3.m +++ b/clang/test/SemaObjC/default-synthesize-3.m @@ -44,7 +44,7 @@ __attribute ((objc_requires_property_definitions)) // expected-error {{'objc_req @interface NSObject @end @protocol Foo @property (readonly) char isFoo; // expected-note {{property declared here}} -@property (readonly) char isNotFree; +@property (readonly) char isNotFree; // expected-note {{property declared here}} @end @interface Bar : NSObject <Foo> @@ -90,9 +90,9 @@ __attribute ((objc_requires_property_definitions)) // expected-error {{'objc_req @end @interface B -@property (readonly) id prop; -@property (readonly) id prop1; -@property (readonly) id prop2; +@property (readonly) id prop; // expected-note {{property declared here}} +@property (readonly) id prop1; // expected-note {{property declared here}} +@property (readonly) id prop2; // expected-note {{property declared here}} @end @interface B() diff --git a/clang/test/SemaObjC/protocols-suppress-conformance.m b/clang/test/SemaObjC/protocols-suppress-conformance.m index 8415154ab1d..a6604b7ff95 100644 --- a/clang/test/SemaObjC/protocols-suppress-conformance.m +++ b/clang/test/SemaObjC/protocols-suppress-conformance.m @@ -13,7 +13,7 @@ __attribute__((objc_protocol_requires_explicit_implementation)) // be adopted later by a subclass. @interface ClassA <Protocol> - (void) theBestOfTimes; -@property (readonly) id theWorstOfTimes; +@property (readonly) id theWorstOfTimes; // expected-note {{property declared here}} @end // This class subclasses ClassA (which also adopts 'Protocol'). diff --git a/clang/test/SemaObjC/super-property-notation.m b/clang/test/SemaObjC/super-property-notation.m index 62ff93cb2b0..2b13a5c0f87 100644 --- a/clang/test/SemaObjC/super-property-notation.m +++ b/clang/test/SemaObjC/super-property-notation.m @@ -30,7 +30,7 @@ void f0() { // rdar://13349296 __attribute__((objc_root_class)) @interface ClassBase -@property (nonatomic, retain) ClassBase * foo; +@property (nonatomic, retain) ClassBase * foo; // expected-note {{property declared here}} @end @implementation ClassBase |

