From 261aa1f23abda9a05d04968b171ebbd8f3eec257 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 28 Jul 2014 16:35:45 +0000 Subject: [PATCH] Objective-C. Improve diagnostic when property is not auto synthesized in current implementation. rdar://17774815 llvm-svn: 214090 --- clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 +- clang/test/SemaObjC/attr-deprecated.m | 2 +- clang/test/SemaObjC/default-synthesize-1.m | 2 +- clang/test/SemaObjC/default-synthesize.m | 2 +- clang/test/SemaObjC/protocols-suppress-conformance.m | 2 +- clang/test/SemaObjC/super-property-notation.m | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 3a83652..7e51596 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/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/clang/test/SemaObjC/attr-deprecated.m b/clang/test/SemaObjC/attr-deprecated.m index f18f99f..9c33b5b 100644 --- a/clang/test/SemaObjC/attr-deprecated.m +++ b/clang/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/clang/test/SemaObjC/default-synthesize-1.m b/clang/test/SemaObjC/default-synthesize-1.m index 31dd669..3ca34e0 100644 --- a/clang/test/SemaObjC/default-synthesize-1.m +++ b/clang/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/clang/test/SemaObjC/default-synthesize.m b/clang/test/SemaObjC/default-synthesize.m index a3abe2e..4865668 100644 --- a/clang/test/SemaObjC/default-synthesize.m +++ b/clang/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/clang/test/SemaObjC/protocols-suppress-conformance.m b/clang/test/SemaObjC/protocols-suppress-conformance.m index dffa6c2..855d2e9 100644 --- a/clang/test/SemaObjC/protocols-suppress-conformance.m +++ b/clang/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/clang/test/SemaObjC/super-property-notation.m b/clang/test/SemaObjC/super-property-notation.m index 0f90f61..7cefe09 100644 --- a/clang/test/SemaObjC/super-property-notation.m +++ b/clang/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}} -- 2.7.4