1 // 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 6 typedef 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 18 static 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 } 25