1// RUN: %clang_cc1 -fsyntax-only -fdebugger-support -verify -Wno-objc-root-class %s 2// RUN: %clang_cc1 -x objective-c++ -fdebugger-support -fsyntax-only -verify -Wno-objc-root-class %s 3// rdar://10997647 4 5@interface I 6{ 7@private 8int ivar; 9} 10@end 11 12@implementation I 13- (int) meth { 14 return self->ivar; 15} 16int foo1(I* p) { 17 return p->ivar; 18} 19@end 20 21int foo(I* p) { 22 return p->ivar; 23} 24 25@interface B 26@end 27 28@implementation B 29- (int) meth : (I*) arg { 30 return arg->ivar; 31} 32@end 33 34 35@interface I1 { 36 int protected_ivar; 37} 38@property int PROP_INMAIN; 39@end 40 41@interface I1() { 42 int private_ivar; 43} 44@property int PROP_INCLASSEXT; 45@end 46 47@implementation I1 48@synthesize PROP_INMAIN, PROP_INCLASSEXT; 49 50- (int) Meth { 51 PROP_INMAIN = 1; 52 PROP_INCLASSEXT = 2; 53 protected_ivar = 1; // OK 54 return private_ivar; // OK 55} 56@end 57 58 59@interface DER : I1 60@end 61 62@implementation DER 63- (int) Meth { 64 protected_ivar = 1; // OK 65 PROP_INMAIN = 1; 66 PROP_INCLASSEXT = 2; 67 return private_ivar; 68} 69@end 70 71