brintos

brintos / llvm-project-archived public Read only

0
0
Text · 654 B · e4752c5 Raw
38 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4 5@interface Object6+ (id) new;7@end8 9@protocol GCObject10@property int class;11@end12 13@protocol DerivedGCObject <GCObject>14@property int Dclass;15@end16 17@interface GCObject  : Object <DerivedGCObject> {18    int ifield;19    int iOwnClass;20    int iDclass;21}22@property int OwnClass;23@end24 25@implementation GCObject : Object26@synthesize class=ifield;27@synthesize Dclass=iDclass;28@synthesize OwnClass=iOwnClass;29@end30 31int main(int argc, char **argv) {32    GCObject *f = [GCObject new];33    f.class = 5;34    f.Dclass = 1;35    f.OwnClass = 3;36    return f.class + f.Dclass  + f.OwnClass - 9;37}38