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