blob: ac0f724df6f6e1620ddf33dce3a6a661a14e9d33 [file] [log] [blame]
Tim Northovera2ee4332014-03-29 15:09:45 +00001// RUN: %clang -target x86_64-apple-darwin -arch arm64 -mios-version-min=7 -fsyntax-only -Wdeprecated-objc-isa-usage %s -Xclang -verify
2// RUN: %clang -target x86_64-apple-darwin -arch arm64 -mios-version-min=7 -fsyntax-only %s -Xclang -verify
3// RUN: %clang -target x86_64-apple-darwin -mios-simulator-version-min=7 -fsyntax-only -Wdeprecated-objc-isa-usage %s -Xclang -verify
4// rdar://10709102
5
6typedef struct objc_object {
7 struct objc_class *isa;
8} *id;
9
10@interface NSObject {
11 struct objc_class *isa;
12}
13@end
14@interface Whatever : NSObject
15+self;
16@end
17
18static void func() {
19
20 id x;
21
22 [(*x).isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
23 [x->isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
24}