From: Fariborz Jahanian Date: Mon, 28 Jul 2014 16:35:45 +0000 (+0000) Subject: Objective-C. Improve diagnostic when property is X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da95110377b782df4640e6bce73c669b23b08599;p=clang Objective-C. Improve diagnostic when property is not auto synthesized in current implementation. rdar://17774815 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214090 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 3a8365243f..7e515960cf 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -785,7 +785,7 @@ def warn_no_autosynthesis_property : Warning< InGroup; def warn_autosynthesis_property_in_superclass : Warning< "auto property synthesis will not synthesize property " - "%0 because it will be synthesize by its super class">, + "%0 because it will be implemented by its superclass">, InGroup; def warn_autosynthesis_property_ivar_match :Warning< "autosynthesized property %0 will use %select{|synthesized}1 instance variable " diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m index f18f99f013..9c33b5bade 100644 --- a/test/SemaObjC/attr-deprecated.m +++ b/test/SemaObjC/attr-deprecated.m @@ -201,7 +201,7 @@ expected-note {{'setObject:' has been explicitly marked deprecated here}} @end @interface TestDerived : TestBase -@property (nonatomic, strong) id object; //expected-warning {{auto property synthesis will not synthesize property 'object' because it will be synthesize by its super class}} +@property (nonatomic, strong) id object; //expected-warning {{auto property synthesis will not synthesize property 'object' because it will be implemented by its superclass}} @end @interface TestUse @end diff --git a/test/SemaObjC/default-synthesize-1.m b/test/SemaObjC/default-synthesize-1.m index 31dd669405..3ca34e027c 100644 --- a/test/SemaObjC/default-synthesize-1.m +++ b/test/SemaObjC/default-synthesize-1.m @@ -132,7 +132,7 @@ @interface ZXCalendarParsedResult : ZXParsedResult -@property (nonatomic, copy, readonly) NSString *description; // expected-warning {{auto property synthesis will not synthesize property 'description' because it will be synthesize by its super class}} +@property (nonatomic, copy, readonly) NSString *description; // expected-warning {{auto property synthesis will not synthesize property 'description' because it will be implemented by its superclass}} @end diff --git a/test/SemaObjC/default-synthesize.m b/test/SemaObjC/default-synthesize.m index a3abe2eca8..4865668af3 100644 --- a/test/SemaObjC/default-synthesize.m +++ b/test/SemaObjC/default-synthesize.m @@ -88,7 +88,7 @@ @end @protocol TopProtocol - @property (readonly) id myString; // expected-warning {{auto property synthesis will not synthesize property 'myString' because it will be synthesize by its super class}} + @property (readonly) id myString; // expected-warning {{auto property synthesis will not synthesize property 'myString' because it will be implemented by its superclass}} @end @interface TopClass diff --git a/test/SemaObjC/protocols-suppress-conformance.m b/test/SemaObjC/protocols-suppress-conformance.m index dffa6c2235..855d2e96ef 100644 --- a/test/SemaObjC/protocols-suppress-conformance.m +++ b/test/SemaObjC/protocols-suppress-conformance.m @@ -34,7 +34,7 @@ __attribute__((objc_protocol_requires_explicit_implementation)) @end @interface ClassB_AlsoGood : ClassA -@property (readonly) id theWorstOfTimes; // expected-warning {{auto property synthesis will not synthesize property 'theWorstOfTimes' because it will be synthesize by its super class}} +@property (readonly) id theWorstOfTimes; // expected-warning {{auto property synthesis will not synthesize property 'theWorstOfTimes' because it will be implemented by its superclass}} @end // Default synthesis acts as if @dynamic diff --git a/test/SemaObjC/super-property-notation.m b/test/SemaObjC/super-property-notation.m index 0f90f617c6..7cefe09b1e 100644 --- a/test/SemaObjC/super-property-notation.m +++ b/test/SemaObjC/super-property-notation.m @@ -41,7 +41,7 @@ __attribute__((objc_root_class)) @interface ClassBase @end @interface ClassDerived : ClassBase -@property (nonatomic, retain) ClassDerived * foo; // expected-warning {{auto property synthesis will not synthesize property 'foo' because it will be synthesize by its super class}} +@property (nonatomic, retain) ClassDerived * foo; // expected-warning {{auto property synthesis will not synthesize property 'foo' because it will be implemented by its superclass}} @end @implementation ClassDerived // expected-note {{detected while default synthesizing properties in class implementation}}