on properties, prevent consequential error diagnostics. // rdar://
10591336
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146737
91177308-0d34-0410-b5e6-
96231b3b80d8
return;
}
}
- else {
+ else
S.Diag(D->getLocation(), diag::warn_nsobject_attribute);
- return;
- }
D->addAttr(::new (S.Context) ObjCNSObjectAttr(Attr.getRange(), S.Context));
}
{
__attribute__((NSObject)) void * color; // expected-warning {{__attribute ((NSObject)) may be put on a typedef only, attribute is ignored}}
}
-@property (nonatomic, retain) __attribute__((NSObject)) void * color; // expected-warning {{__attribute ((NSObject)) may be put on a typedef only, attribute is ignored}} \
- // expected-error {{property with 'retain (or strong)' attribute must be of object type}}
+@property (nonatomic, retain) __attribute__((NSObject)) void * color; // expected-warning {{__attribute ((NSObject)) may be put on a typedef only, attribute is ignored}}
@end
void test_10453342() {
char* __attribute__((NSObject)) string2 = 0; // expected-warning {{__attribute ((NSObject)) may be put on a typedef only, attribute is ignored}}