// Attributes
def err_nsobject_attribute : Error<
- "__attribute ((NSObject)) is for pointer types only">;
+ "'NSObject' attribute is for pointer types only">;
def err_attribute_can_be_applied_only_to_symbol_declaration : Error<
"%0 attribute can be applied only to symbol declaration">;
def err_attributes_are_not_compatible : Error<
"Objective-C GC does not allow weak variables on the stack">,
InGroup<IgnoredAttributes>;
def warn_nsobject_attribute : Warning<
- "__attribute ((NSObject)) may be put on a typedef only, "
- "attribute is ignored">, InGroup<NSobjectAttribute>;
+ "'NSObject' attribute may be put on a typedef only; attribute is ignored">,
+ InGroup<NSobjectAttribute>;
def warn_attribute_weak_on_local : Warning<
"__weak attribute cannot be specified on an automatic variable when ARC "
"is not enabled">,
static int count;
static CGColorRef tmp = 0;
-typedef struct S1 __attribute__ ((NSObject)) CGColorRef1; // expected-error {{__attribute ((NSObject)) is for pointer types only}}
+typedef struct S1 __attribute__ ((NSObject)) CGColorRef1; // expected-error {{'NSObject' attribute is for pointer types only}}
typedef void * __attribute__ ((NSObject)) CGColorRef2; // no-warning
typedef void * CFTypeRef;
// rdar://10453342
@interface I
{
- __attribute__((NSObject)) void * color; // expected-warning {{__attribute ((NSObject)) may be put on a typedef only, attribute is ignored}}
+ __attribute__((NSObject)) void * color; // expected-warning {{'NSObject' attribute may be put on a typedef only; attribute is ignored}}
}
// <rdar://problem/10930507>
@property (nonatomic, retain) __attribute__((NSObject)) CGColorRefNoNSObject color; // // no-warning
@end
void test_10453342() {
- char* __attribute__((NSObject)) string2 = 0; // expected-warning {{__attribute ((NSObject)) may be put on a typedef only, attribute is ignored}}
+ char* __attribute__((NSObject)) string2 = 0; // expected-warning {{'NSObject' attribute may be put on a typedef only; attribute is ignored}}
}
// rdar://11569860
@interface A { int i; }
-@property(retain) __attribute__((NSObject)) int i; // expected-error {{__attribute ((NSObject)) is for pointer types only}} \
+@property(retain) __attribute__((NSObject)) int i; // expected-error {{'NSObject' attribute is for pointer types only}} \
// expected-error {{property with 'retain (or strong)' attribute must be of object type}}
@end