minix/external/bsd/llvm/dist/clang/test/SemaObjC/property-noprotocol-warning.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

37 lines
654 B
Objective-C

// RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics
@interface Object
+ (id) new;
@end
@protocol GCObject
@property int class;
@end
@protocol DerivedGCObject <GCObject>
@property int Dclass;
@end
@interface GCObject : Object <DerivedGCObject> {
int ifield;
int iOwnClass;
int iDclass;
}
@property int OwnClass;
@end
@implementation GCObject : Object
@synthesize class=ifield;
@synthesize Dclass=iDclass;
@synthesize OwnClass=iOwnClass;
@end
int main(int argc, char **argv) {
GCObject *f = [GCObject new];
f.class = 5;
f.Dclass = 1;
f.OwnClass = 3;
return f.class + f.Dclass + f.OwnClass - 9;
}