r214090 - Objective-C. Improve diagnostic when property is

Fariborz Jahanian fjahanian at apple.com
Mon Jul 28 09:35:45 PDT 2014


Author: fjahanian
Date: Mon Jul 28 11:35:45 2014
New Revision: 214090

URL: http://llvm.org/viewvc/llvm-project?rev=214090&view=rev
Log:
Objective-C. Improve diagnostic when property is
not auto synthesized in current implementation.
rdar://17774815

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/SemaObjC/attr-deprecated.m
    cfe/trunk/test/SemaObjC/default-synthesize-1.m
    cfe/trunk/test/SemaObjC/default-synthesize.m
    cfe/trunk/test/SemaObjC/protocols-suppress-conformance.m
    cfe/trunk/test/SemaObjC/super-property-notation.m

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=214090&r1=214089&r2=214090&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Jul 28 11:35:45 2014
@@ -785,7 +785,7 @@ def warn_no_autosynthesis_property : War
   InGroup<ObjCNoPropertyAutoSynthesis>;
 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<ObjCNoPropertyAutoSynthesis>;
 def warn_autosynthesis_property_ivar_match :Warning<
   "autosynthesized property %0 will use %select{|synthesized}1 instance variable "

Modified: cfe/trunk/test/SemaObjC/attr-deprecated.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/attr-deprecated.m?rev=214090&r1=214089&r2=214090&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/attr-deprecated.m (original)
+++ cfe/trunk/test/SemaObjC/attr-deprecated.m Mon Jul 28 11:35:45 2014
@@ -201,7 +201,7 @@ expected-note {{'setObject:' has been ex
 @end
 
 @interface TestDerived : TestBase
- at property (nonatomic, strong) id object; //expected-warning {{auto property synthesis will not synthesize property 'object' because it will be synthesize by its super class}}
+ at 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

Modified: cfe/trunk/test/SemaObjC/default-synthesize-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/default-synthesize-1.m?rev=214090&r1=214089&r2=214090&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/default-synthesize-1.m (original)
+++ cfe/trunk/test/SemaObjC/default-synthesize-1.m Mon Jul 28 11:35:45 2014
@@ -132,7 +132,7 @@
 
 @interface ZXCalendarParsedResult : ZXParsedResult
 
- at 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}}
+ at 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
 

Modified: cfe/trunk/test/SemaObjC/default-synthesize.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/default-synthesize.m?rev=214090&r1=214089&r2=214090&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/default-synthesize.m (original)
+++ cfe/trunk/test/SemaObjC/default-synthesize.m Mon Jul 28 11:35:45 2014
@@ -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 <TopProtocol> 

Modified: cfe/trunk/test/SemaObjC/protocols-suppress-conformance.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/protocols-suppress-conformance.m?rev=214090&r1=214089&r2=214090&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/protocols-suppress-conformance.m (original)
+++ cfe/trunk/test/SemaObjC/protocols-suppress-conformance.m Mon Jul 28 11:35:45 2014
@@ -34,7 +34,7 @@ __attribute__((objc_protocol_requires_ex
 @end
 
 @interface ClassB_AlsoGood : ClassA <Protocol>
- at property (readonly) id theWorstOfTimes; // expected-warning {{auto property synthesis will not synthesize property 'theWorstOfTimes' because it will be synthesize by its super class}}
+ at 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

Modified: cfe/trunk/test/SemaObjC/super-property-notation.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/super-property-notation.m?rev=214090&r1=214089&r2=214090&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/super-property-notation.m (original)
+++ cfe/trunk/test/SemaObjC/super-property-notation.m Mon Jul 28 11:35:45 2014
@@ -41,7 +41,7 @@ __attribute__((objc_root_class)) @interf
 @end
 
 @interface ClassDerived : ClassBase 
- at property (nonatomic, retain) ClassDerived * foo; // expected-warning {{auto property synthesis will not synthesize property 'foo' because it will be synthesize by its super class}}
+ at 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}}





More information about the cfe-commits mailing list