From: Fariborz Jahanian Date: Mon, 24 Sep 2012 22:00:36 +0000 (+0000) Subject: objective-C: remove use of 'ivar' in favor of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59ed9e40bbb6d0b8f8cd194e059624e954b0eae7;p=clang objective-C: remove use of 'ivar' in favor of 'instance variable' in text of all diagnostics for objective-C: // rdar://12352442 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164559 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 3cd3d4303e..e8e90b415b 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -695,7 +695,7 @@ def error_bad_property_context : Error< "property implementation must be in a class or category implementation">; def error_missing_property_ivar_decl : Error< "synthesized property %0 must either be named the same as a compatible" - " ivar or must explicitly name an ivar">; + " instance variable or must explicitly name an instance variable">; def error_synthesize_weak_non_arc_or_gc : Error< "@synthesize of 'weak' property is only allowed in ARC or GC mode">; def err_arc_perform_selector_retains : Error< @@ -713,19 +713,19 @@ def err_incomplete_synthesized_property : Error< "cannot synthesize property %0 with incomplete type %1">; def error_property_ivar_type : Error< - "type of property %0 (%1) does not match type of ivar %2 (%3)">; + "type of property %0 (%1) does not match type of instance variable %2 (%3)">; def error_property_accessor_type : Error< "type of property %0 (%1) does not match type of accessor %2 (%3)">; def error_ivar_in_superclass_use : Error< - "property %0 attempting to use ivar %1 declared in super class %2">; + "property %0 attempting to use instance variable %1 declared in super class %2">; def error_weak_property : Error< - "existing ivar %1 for __weak property %0 must be __weak">; + "existing instance variable %1 for __weak property %0 must be __weak">; def error_strong_property : Error< - "existing ivar %1 for strong property %0 may not be __weak">; + "existing instance variable %1 for strong property %0 may not be __weak">; def error_dynamic_property_ivar_decl : Error< - "dynamic property can not have ivar specification">; + "dynamic property can not have instance variable specification">; def error_duplicate_ivar_use : Error< - "synthesized properties %0 and %1 both claim ivar %2">; + "synthesized properties %0 and %1 both claim instance variable %2">; def error_property_implemented : Error<"property %0 is already implemented">; def warn_objc_property_attr_mutually_exclusive : Warning< "property attributes '%0' and '%1' are mutually exclusive">, @@ -813,7 +813,7 @@ def err_friend_not_first_in_declaration : Error< "'friend' must appear first in a non-function declaration">; def err_abstract_type_in_decl : Error< - "%select{return|parameter|variable|field|ivar}0 type %1 is an abstract class">; + "%select{return|parameter|variable|field|instance variable}0 type %1 is an abstract class">; def err_allocation_of_abstract_type : Error< "allocating an object of abstract class type %0">; def err_throw_abstract_type : Error< @@ -1028,7 +1028,7 @@ def warn_call_to_pure_virtual_member_function_from_ctor_dtor : Warning< "not available in the %select{constructor|destructor}1 of %2">; def note_field_decl : Note<"member is declared here">; -def note_ivar_decl : Note<"ivar is declared here">; +def note_ivar_decl : Note<"instance variable is declared here">; def note_bitfield_decl : Note<"bit-field is declared here">; def note_previous_decl : Note<"%0 declared here">; def note_member_synthesized_at : Note< @@ -2047,7 +2047,7 @@ def warn_attribute_ibaction: Warning< def err_iboutletcollection_type : Error< "invalid type %0 as argument of iboutletcollection attribute">; def warn_iboutlet_object_type : Warning< - "%select{ivar|property}2 with %0 attribute must " + "%select{instance variable|property}2 with %0 attribute must " "be an object type (invalid %1)">, InGroup>; def err_attribute_overloadable_not_function : Error< @@ -3235,9 +3235,9 @@ def ext_forward_ref_enum_def : Extension< def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">; def err_duplicate_member : Error<"duplicate member %0">; def err_misplaced_ivar : Error< - "ivars may not be placed in %select{categories|class extension}0">; + "instance variable may not be placed in %select{categories|class extension}0">; def warn_ivars_in_interface : Warning< - "declaration of ivars in the interface is deprecated">, + "declaration of instance variables in the interface is deprecated">, InGroup>, DefaultIgnore; def ext_enum_value_not_int : Extension< "ISO C restricts enumerator values to range of 'int' (%0 is too " @@ -3547,7 +3547,7 @@ def err_arc_weak_unavailable_assign : Error< "assignment of a weak-unavailable object to a __weak object">; def err_arc_weak_unavailable_property : Error< "synthesis of a weak-unavailable property is disallowed " - "because it requires synthesis of an ivar of the __weak object">; + "because it requires synthesis of an instance variable of the __weak object">; def err_arc_convesion_of_weak_unavailable : Error< "%select{implicit conversion|cast}0 of weak-unavailable object of type %1 to" " a __weak object of type %2">; @@ -3614,7 +3614,7 @@ def warn_arc_retained_property_assign : Warning< def err_arc_new_array_without_ownership : Error< "'new' cannot allocate an array of %0 with no explicit ownership">; def err_arc_autoreleasing_var : Error< - "%select{__block variables|global variables|fields|ivars}0 cannot have " + "%select{__block variables|global variables|fields|instance variable}0 cannot have " "__autoreleasing ownership">; def err_arc_autoreleasing_capture : Error< "cannot capture __autoreleasing variable in a " @@ -3671,10 +3671,10 @@ def warn_arc_object_memaccess : Warning< let CategoryName = "ARC and @properties" in { def err_arc_strong_property_ownership : Error< - "existing ivar %1 for strong property %0 may not be " + "existing instance variable %1 for strong property %0 may not be " "%select{|__unsafe_unretained||__weak}2">; def err_arc_assign_property_ownership : Error< - "existing ivar %1 for property %0 with %select{unsafe_unretained| assign}2 " + "existing instance variable %1 for property %0 with %select{unsafe_unretained| assign}2 " "attribute must be __unsafe_unretained">; def err_arc_inconsistent_property_ownership : Error< "%select{|unsafe_unretained|strong|weak}1 property %0 may not also be " @@ -4210,7 +4210,7 @@ def err_nogetter_property_incdec : Error< def error_no_subobject_property_setting : Error< "expression is not assignable">; def err_qualified_objc_access : Error< - "%select{property|ivar}0 access cannot be qualified with '%1'">; + "%select{property|instance variable}0 access cannot be qualified with '%1'">; def ext_freestanding_complex : Extension< "complex numbers are an extension in a freestanding C99 implementation">; @@ -5879,7 +5879,7 @@ def err_typecheck_member_reference_ivar_suggest : Error< def err_property_not_found_suggest : Error< "property %0 not found on object of type %1; did you mean %2?">; def err_ivar_access_using_property_syntax_suggest : Error< - "property %0 not found on object of type %1; did you mean to access ivar %2?">; + "property %0 not found on object of type %1; did you mean to access instance variable %2?">; def err_property_found_suggest : Error< "property %0 found on object of type %1; did you mean to access " "it with the \".\" operator?">; diff --git a/test/FixIt/fixit-objc.m b/test/FixIt/fixit-objc.m index df591c7922..77099fccc9 100644 --- a/test/FixIt/fixit-objc.m +++ b/test/FixIt/fixit-objc.m @@ -49,7 +49,7 @@ void f(Test *t) { @property (assign) int y; @end -int f0(Radar7861841 *a) { return a.x; } // expected-error {{property 'x' not found on object of type 'Radar7861841 *'; did you mean to access ivar 'x'}} +int f0(Radar7861841 *a) { return a.x; } // expected-error {{property 'x' not found on object of type 'Radar7861841 *'; did you mean to access instance variable 'x'}} int f1(Radar7861841 *a) { return a->y; } // expected-error {{property 'y' found on object of type 'Radar7861841 *'; did you mean to access it with the "." operator?}} diff --git a/test/SemaObjC/arc-property-decl-attrs.m b/test/SemaObjC/arc-property-decl-attrs.m index 1386241dd7..b474df4325 100644 --- a/test/SemaObjC/arc-property-decl-attrs.m +++ b/test/SemaObjC/arc-property-decl-attrs.m @@ -5,7 +5,7 @@ @public id __unsafe_unretained x; id __weak y; - id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}} + id __autoreleasing z; // expected-error {{instance variable cannot have __autoreleasing ownership}} } @property(strong) id x; @property(strong) id y; @@ -16,7 +16,7 @@ @public id __unsafe_unretained x; id __weak y; - id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}} + id __autoreleasing z; // expected-error {{instance variable cannot have __autoreleasing ownership}} } @property(retain) id x; @property(retain) id y; @@ -27,7 +27,7 @@ @public id __unsafe_unretained x; id __weak y; - id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}} + id __autoreleasing z; // expected-error {{instance variable cannot have __autoreleasing ownership}} } @property(copy) id x; @property(copy) id y; diff --git a/test/SemaObjC/arc-property-lifetime.m b/test/SemaObjC/arc-property-lifetime.m index bd393e0bf5..9da17672de 100644 --- a/test/SemaObjC/arc-property-lifetime.m +++ b/test/SemaObjC/arc-property-lifetime.m @@ -5,7 +5,7 @@ @public id __unsafe_unretained x; id __weak y; - id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}} + id __autoreleasing z; // expected-error {{instance variable cannot have __autoreleasing ownership}} } @property(strong) id x; // expected-note {{property declared here}} @property(strong) id y; // expected-note {{property declared here}} @@ -13,8 +13,8 @@ @end @implementation Foo -@synthesize x; // expected-error {{existing ivar 'x' for strong property 'x' may not be __unsafe_unretained}} -@synthesize y; // expected-error {{existing ivar 'y' for strong property 'y' may not be __weak}} +@synthesize x; // expected-error {{existing instance variable 'x' for strong property 'x' may not be __unsafe_unretained}} +@synthesize y; // expected-error {{existing instance variable 'y' for strong property 'y' may not be __weak}} @synthesize z; // suppressed @end @@ -22,7 +22,7 @@ @public id __unsafe_unretained x; id __weak y; - id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}} + id __autoreleasing z; // expected-error {{instance variable cannot have __autoreleasing ownership}} } @property(retain) id x; // expected-note {{property declared here}} @property(retain) id y; // expected-note {{property declared here}} @@ -30,8 +30,8 @@ @end @implementation Bar -@synthesize x; // expected-error {{existing ivar 'x' for strong property 'x' may not be __unsafe_unretained}} -@synthesize y; // expected-error {{existing ivar 'y' for strong property 'y' may not be __weak}} +@synthesize x; // expected-error {{existing instance variable 'x' for strong property 'x' may not be __unsafe_unretained}} +@synthesize y; // expected-error {{existing instance variable 'y' for strong property 'y' may not be __weak}} @synthesize z; // suppressed @end @@ -39,7 +39,7 @@ @public id __unsafe_unretained x; id __weak y; - id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}} + id __autoreleasing z; // expected-error {{instance variable cannot have __autoreleasing ownership}} } @property(copy) id x; // expected-note {{property declared here}} @property(copy) id y; // expected-note {{property declared here}} @@ -47,8 +47,8 @@ @end @implementation Bas -@synthesize x; // expected-error {{existing ivar 'x' for strong property 'x' may not be __unsafe_unretained}} -@synthesize y; // expected-error {{existing ivar 'y' for strong property 'y' may not be __weak}} +@synthesize x; // expected-error {{existing instance variable 'x' for strong property 'x' may not be __unsafe_unretained}} +@synthesize y; // expected-error {{existing instance variable 'y' for strong property 'y' may not be __weak}} @synthesize z; // suppressed @end @@ -79,7 +79,7 @@ @implementation Gorf @synthesize x; -@synthesize y; // expected-error {{existing ivar 'y' for property 'y' with assign attribute must be __unsafe_unretained}} +@synthesize y; // expected-error {{existing instance variable 'y' for property 'y' with assign attribute must be __unsafe_unretained}} @synthesize z; @end @@ -94,7 +94,7 @@ @implementation Gorf2 @synthesize x; -@synthesize y; // expected-error {{existing ivar 'y' for property 'y' with unsafe_unretained attribute must be __unsafe_unretained}} +@synthesize y; // expected-error {{existing instance variable 'y' for property 'y' with unsafe_unretained attribute must be __unsafe_unretained}} @synthesize z; @end diff --git a/test/SemaObjC/arc-property.m b/test/SemaObjC/arc-property.m index 41d8e87239..826dbd384a 100644 --- a/test/SemaObjC/arc-property.m +++ b/test/SemaObjC/arc-property.m @@ -18,13 +18,13 @@ @end @implementation MyClass -@synthesize myString; // expected-error {{existing ivar 'myString' for strong property 'myString' may not be __weak}} +@synthesize myString; // expected-error {{existing instance variable 'myString' for strong property 'myString' may not be __weak}} @synthesize myString1 = StrongIvar; // OK -@synthesize myString2 = myString2; // expected-error {{existing ivar 'myString2' for strong property 'myString2' may not be __weak}} +@synthesize myString2 = myString2; // expected-error {{existing instance variable 'myString2' for strong property 'myString2' may not be __weak}} // @synthesize myString3; // OK @synthesize myString4; // OK -@synthesize myString5 = StrongIvar5; // expected-error {{existing ivar 'StrongIvar5' for __weak property 'myString5' must be __weak}} +@synthesize myString5 = StrongIvar5; // expected-error {{existing instance variable 'StrongIvar5' for __weak property 'myString5' must be __weak}} @end @@ -33,7 +33,7 @@ @public id __unsafe_unretained x; // should be __weak id __strong y; - id __autoreleasing z; // expected-error {{ivars cannot have __autoreleasing ownership}} + id __autoreleasing z; // expected-error {{instance variable cannot have __autoreleasing ownership}} } @property(weak) id x; // expected-note {{property declared here}} @property(weak) id y; // expected-note {{property declared here}} @@ -41,8 +41,8 @@ @end @implementation Foo -@synthesize x; // expected-error {{existing ivar 'x' for __weak property 'x' must be __weak}} -@synthesize y; // expected-error {{existing ivar 'y' for __weak property 'y' must be __weak}} +@synthesize x; // expected-error {{existing instance variable 'x' for __weak property 'x' must be __weak}} +@synthesize y; // expected-error {{existing instance variable 'y' for __weak property 'y' must be __weak}} @synthesize z; // suppressed @end diff --git a/test/SemaObjC/arc-unavailable-for-weakref.m b/test/SemaObjC/arc-unavailable-for-weakref.m index 8498de6d9a..b140c64da7 100644 --- a/test/SemaObjC/arc-unavailable-for-weakref.m +++ b/test/SemaObjC/arc-unavailable-for-weakref.m @@ -60,5 +60,5 @@ __attribute__((objc_arc_weak_reference_unavailable)) @end @implementation I -@synthesize font = _font; // expected-error {{synthesis of a weak-unavailable property is disallowed because it requires synthesis of an ivar of the __weak object}} +@synthesize font = _font; // expected-error {{synthesis of a weak-unavailable property is disallowed because it requires synthesis of an instance variable of the __weak object}} @end diff --git a/test/SemaObjC/default-synthesize-2.m b/test/SemaObjC/default-synthesize-2.m index 3756413bd8..20c045e60e 100644 --- a/test/SemaObjC/default-synthesize-2.m +++ b/test/SemaObjC/default-synthesize-2.m @@ -41,7 +41,7 @@ // Test3 @interface Test3 { - id uid; // expected-note {{ivar is declared here}} + id uid; // expected-note {{instance variable is declared here}} } @property (readwrite, assign) id uid; // expected-note {{property declared here}} @end @@ -119,7 +119,7 @@ int* _object; @interface Test8 { id _y; - id y; // expected-note {{ivar is declared here}} + id y; // expected-note {{instance variable is declared here}} } @property(copy) id y; // expected-note {{property declared here}} @end diff --git a/test/SemaObjC/error-property-gc-attr.m b/test/SemaObjC/error-property-gc-attr.m index 56802960c6..dfac0d4286 100644 --- a/test/SemaObjC/error-property-gc-attr.m +++ b/test/SemaObjC/error-property-gc-attr.m @@ -3,7 +3,7 @@ @interface INTF { - id IVAR; // expected-note {{ivar is declared here}} + id IVAR; // expected-note {{instance variable is declared here}} __weak id II; __weak id WID; id ID; @@ -19,10 +19,10 @@ @end @implementation INTF -@synthesize pweak=IVAR; // expected-error {{existing ivar 'IVAR' for __weak property 'pweak' must be __weak}} -@synthesize NOT=II; // expected-error {{existing ivar 'II' for strong property 'NOT' may not be __weak}} +@synthesize pweak=IVAR; // expected-error {{existing instance variable 'IVAR' for __weak property 'pweak' must be __weak}} +@synthesize NOT=II; // expected-error {{existing instance variable 'II' for strong property 'NOT' may not be __weak}} @synthesize WID; @synthesize ID; -@synthesize AWEAK; // expected-error {{existing ivar 'AWEAK' for strong property 'AWEAK' may not be __weak}} +@synthesize AWEAK; // expected-error {{existing instance variable 'AWEAK' for strong property 'AWEAK' may not be __weak}} @synthesize WI; @end diff --git a/test/SemaObjC/iboutletcollection-attr.m b/test/SemaObjC/iboutletcollection-attr.m index 22c21a764b..82cb96fbed 100644 --- a/test/SemaObjC/iboutletcollection-attr.m +++ b/test/SemaObjC/iboutletcollection-attr.m @@ -21,9 +21,9 @@ typedef void *PV; __attribute__((iboutletcollection(I, 1))) id ivar1; // expected-error {{attribute takes one argument}} __attribute__((iboutletcollection(B))) id ivar2; // expected-error {{invalid type 'B' as argument of iboutletcollection attribute}} __attribute__((iboutletcollection(PV))) id ivar3; // expected-error {{invalid type 'PV' as argument of iboutletcollection attribute}} - __attribute__((iboutletcollection(PV))) void *ivar4; // expected-warning {{ivar with 'iboutletcollection' attribute must be an object type (invalid 'void *')}} + __attribute__((iboutletcollection(PV))) void *ivar4; // expected-warning {{instance variable with 'iboutletcollection' attribute must be an object type (invalid 'void *')}} __attribute__((iboutletcollection(int))) id ivar5; // expected-error {{type argument of iboutletcollection attribute cannot be a builtin type}} - __attribute__((iboutlet)) int ivar6; // expected-warning {{ivar with 'iboutlet' attribute must be an object type}} + __attribute__((iboutlet)) int ivar6; // expected-warning {{instance variable with 'iboutlet' attribute must be an object type}} } @property (nonatomic, retain) __attribute__((iboutletcollection(I,2,3))) id prop1; // expected-error {{attribute takes one argument}} @property (nonatomic, retain) __attribute__((iboutletcollection(B))) id prop2; // expected-error {{invalid type 'B' as argument of iboutletcollection attribute}} diff --git a/test/SemaObjC/ivar-in-class-extension-error.m b/test/SemaObjC/ivar-in-class-extension-error.m index b22b7984cc..d3f49b8046 100644 --- a/test/SemaObjC/ivar-in-class-extension-error.m +++ b/test/SemaObjC/ivar-in-class-extension-error.m @@ -4,12 +4,12 @@ @interface A @end @interface A () { - int _p0; // expected-error {{ivars may not be placed in class extension}} + int _p0; // expected-error {{instance variable may not be placed in class extension}} } @property int p0; @end @interface A(CAT) { - int _p1; // expected-error {{ivars may not be placed in categories}} + int _p1; // expected-error {{instance variable may not be placed in categories}} } @end diff --git a/test/SemaObjC/ivar-in-class-extension.m b/test/SemaObjC/ivar-in-class-extension.m index cf02d26e72..6f3de6a70e 100644 --- a/test/SemaObjC/ivar-in-class-extension.m +++ b/test/SemaObjC/ivar-in-class-extension.m @@ -32,7 +32,7 @@ int fn3(SomeClass *obj) { @interface SomeClass (Category) { - int categoryIvar; // expected-error {{ivars may not be placed in categories}} + int categoryIvar; // expected-error {{instance variable may not be placed in categories}} } @end diff --git a/test/SemaObjC/ivar-sem-check-2.m b/test/SemaObjC/ivar-sem-check-2.m index bf884b3d9d..b1e1f2c2ef 100644 --- a/test/SemaObjC/ivar-sem-check-2.m +++ b/test/SemaObjC/ivar-sem-check-2.m @@ -16,8 +16,8 @@ @implementation Sub @synthesize value; // expected-note {{previous use is here}} -@synthesize value1=value; // expected-error {{synthesized properties 'value1' and 'value' both claim ivar 'value'}} -@synthesize prop=value2; // expected-error {{property 'prop' attempting to use ivar 'value2' declared in super class 'Super'}} +@synthesize value1=value; // expected-error {{synthesized properties 'value1' and 'value' both claim instance variable 'value'}} +@synthesize prop=value2; // expected-error {{property 'prop' attempting to use instance variable 'value2' declared in super class 'Super'}} @end diff --git a/test/SemaObjC/no-ivar-in-interface-block.m b/test/SemaObjC/no-ivar-in-interface-block.m index 215db6150e..af4797f1b6 100644 --- a/test/SemaObjC/no-ivar-in-interface-block.m +++ b/test/SemaObjC/no-ivar-in-interface-block.m @@ -3,11 +3,11 @@ @interface I { - @protected int P_IVAR; // expected-warning {{declaration of ivars in the interface is deprecated}} + @protected int P_IVAR; // expected-warning {{declaration of instance variables in the interface is deprecated}} - @public int PU_IVAR; // expected-warning {{declaration of ivars in the interface is deprecated}} + @public int PU_IVAR; // expected-warning {{declaration of instance variables in the interface is deprecated}} - @private int PRV_IVAR; // expected-warning {{declaration of ivars in the interface is deprecated}} + @private int PRV_IVAR; // expected-warning {{declaration of instance variables in the interface is deprecated}} } @end diff --git a/test/SemaObjC/property-and-class-extension.m b/test/SemaObjC/property-and-class-extension.m index 7040078416..80cedc372d 100644 --- a/test/SemaObjC/property-and-class-extension.m +++ b/test/SemaObjC/property-and-class-extension.m @@ -31,6 +31,6 @@ extension but ignore any ivars in superclass class extensions. @end @implementation SomeClass -@synthesize Property; // expected-error {{property 'Property' attempting to use ivar 'Property' declared in super class 'Super'}} +@synthesize Property; // expected-error {{property 'Property' attempting to use instance variable 'Property' declared in super class 'Super'}} @synthesize Property1; // OK @end diff --git a/test/SemaObjC/property-impl-misuse.m b/test/SemaObjC/property-impl-misuse.m index 939909e9b2..c49916e10d 100644 --- a/test/SemaObjC/property-impl-misuse.m +++ b/test/SemaObjC/property-impl-misuse.m @@ -12,7 +12,7 @@ @dynamic X; // expected-note {{previous declaration is here}} @dynamic X; // expected-error {{property 'X' is already implemented}} @synthesize Y; // expected-note {{previous use is here}} -@synthesize Z=Y; // expected-error {{synthesized properties 'Z' and 'Y' both claim ivar 'Y'}} +@synthesize Z=Y; // expected-error {{synthesized properties 'Z' and 'Y' both claim instance variable 'Y'}} @end // rdar://8703553 diff --git a/test/SemaObjC/property-ivar-mismatch.m b/test/SemaObjC/property-ivar-mismatch.m index a0d1c9da7b..148fa8ebb2 100644 --- a/test/SemaObjC/property-ivar-mismatch.m +++ b/test/SemaObjC/property-ivar-mismatch.m @@ -3,24 +3,24 @@ @interface Test4 { - char ivar; // expected-note{{ivar is declared here}} + char ivar; // expected-note{{instance variable is declared here}} } @property int prop; @end @implementation Test4 -@synthesize prop = ivar; // expected-error {{type of property 'prop' ('int') does not match type of ivar 'ivar' ('char')}} +@synthesize prop = ivar; // expected-error {{type of property 'prop' ('int') does not match type of instance variable 'ivar' ('char')}} @end @interface Test5 { - void * _P; // expected-note {{ivar is declared here}} + void * _P; // expected-note {{instance variable is declared here}} } @property int P; @end @implementation Test5 -@synthesize P=_P; // expected-error {{ype of property 'P' ('int') does not match type of ivar '_P' ('void *')}} +@synthesize P=_P; // expected-error {{ype of property 'P' ('int') does not match type of instance variable '_P' ('void *')}} @end diff --git a/test/SemaObjC/property.m b/test/SemaObjC/property.m index d6495b4230..76fdf5b242 100644 --- a/test/SemaObjC/property.m +++ b/test/SemaObjC/property.m @@ -2,7 +2,7 @@ @interface I { - int IVAR; // expected-note{{ivar is declared here}} + int IVAR; // expected-note{{instance variable is declared here}} int name; } @property int d1; @@ -18,7 +18,7 @@ @synthesize d1; // expected-error {{synthesized property 'd1' must either be named the same as}} @dynamic bad; // expected-error {{property implementation must have its declaration in interface 'I'}} @synthesize prop_id; // expected-error {{synthesized property 'prop_id' must either be named the same}} // expected-note {{previous declaration is here}} -@synthesize prop_id = IVAR; // expected-error {{type of property 'prop_id' ('id') does not match type of ivar 'IVAR' ('int')}} // expected-error {{property 'prop_id' is already implemented}} +@synthesize prop_id = IVAR; // expected-error {{type of property 'prop_id' ('id') does not match type of instance variable 'IVAR' ('int')}} // expected-error {{property 'prop_id' is already implemented}} @synthesize name; // OK! property with same name as an accessible ivar of same name @end diff --git a/test/SemaObjC/warn-direct-ivar-access.m b/test/SemaObjC/warn-direct-ivar-access.m index d2295f4765..088fe0fa26 100644 --- a/test/SemaObjC/warn-direct-ivar-access.m +++ b/test/SemaObjC/warn-direct-ivar-access.m @@ -15,7 +15,7 @@ __attribute__((objc_root_class)) @interface MyObject { @implementation MyObject @synthesize myMaster = _myMaster; -@synthesize isTickledPink = _isTickledPink; // expected-error {{existing ivar '_isTickledPink' for property 'isTickledPink'}} +@synthesize isTickledPink = _isTickledPink; // expected-error {{existing instance variable '_isTickledPink' for property 'isTickledPink'}} @synthesize myIntProp = _myIntProp; - (void) doSomething { diff --git a/test/SemaObjC/warn-isa-ref.m b/test/SemaObjC/warn-isa-ref.m index 1932a029b0..9d7abd48ad 100644 --- a/test/SemaObjC/warn-isa-ref.m +++ b/test/SemaObjC/warn-isa-ref.m @@ -41,7 +41,7 @@ static void func() { @interface BaseClass { @public - Class isa; // expected-note 3 {{ivar is declared here}} + Class isa; // expected-note 3 {{instance variable is declared here}} } @end diff --git a/test/SemaObjC/weak-property.m b/test/SemaObjC/weak-property.m index 8a2adf99b7..141c35b9ac 100644 --- a/test/SemaObjC/weak-property.m +++ b/test/SemaObjC/weak-property.m @@ -19,6 +19,6 @@ @end @implementation WeakPropertyTest -@synthesize x; // expected-error {{existing ivar 'x' for __weak property 'x' must be __weak}} +@synthesize x; // expected-error {{existing instance variable 'x' for __weak property 'x' must be __weak}} @dynamic value1, value, value2, v1,v2,v3,v4; @end diff --git a/test/SemaObjCXX/abstract-class-type-ivar.mm b/test/SemaObjCXX/abstract-class-type-ivar.mm index 823e9c197d..990ba1c2ab 100644 --- a/test/SemaObjCXX/abstract-class-type-ivar.mm +++ b/test/SemaObjCXX/abstract-class-type-ivar.mm @@ -13,7 +13,7 @@ class CppConcreteSub : public CppAbstractBase { }; @interface Objc { - CppConcreteSub _concrete; // expected-error{{ivar type 'CppConcreteSub' is an abstract class}} + CppConcreteSub _concrete; // expected-error{{instance variable type 'CppConcreteSub' is an abstract class}} } - (CppAbstractBase*)abstract; @end diff --git a/test/SemaObjCXX/propert-dot-error.mm b/test/SemaObjCXX/propert-dot-error.mm index 2237411aaf..2a462e4ffa 100644 --- a/test/SemaObjCXX/propert-dot-error.mm +++ b/test/SemaObjCXX/propert-dot-error.mm @@ -63,7 +63,7 @@ class Forward; void testD(D *d) { d.Forward::property = 17; // expected-error{{property access cannot be qualified with 'Forward::'}} - d->Forward::ivar = 12; // expected-error{{ivar access cannot be qualified with 'Forward::'}} + d->Forward::ivar = 12; // expected-error{{instance variable access cannot be qualified with 'Forward::'}} d.D::property = 17; // expected-error{{expected a class or namespace}} d->D::ivar = 12; // expected-error{{expected a class or namespace}} }