brintos

brintos / llvm-project-archived public Read only

0
0
Text · 403 B · ff5c174 Raw
27 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s2// expected-no-diagnostics3 4@interface MyParent {5  int X;6}7@end8@implementation MyParent9@end10 11@interface MyParent(AA) {12}13@end14@implementation MyParent (AA)15- (void) setX: (int)in {X = in - 2;}16- (int) X {return X;}17@end18 19@interface MyClass : MyParent20@end21@implementation MyClass22@end23 24int foo(MyClass *o) {25  o.X = 2;26  return o.X;27}