diff options
author | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
commit | f27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch) | |
tree | ce7d964cbb5e39695b71481698f10cb099c23d4a /test/SemaObjC/property-noprotocol-warning.m | |
download | FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz |
Import Clang, at r72732.
Diffstat (limited to 'test/SemaObjC/property-noprotocol-warning.m')
-rw-r--r-- | test/SemaObjC/property-noprotocol-warning.m | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/SemaObjC/property-noprotocol-warning.m b/test/SemaObjC/property-noprotocol-warning.m new file mode 100644 index 0000000..95ec15a --- /dev/null +++ b/test/SemaObjC/property-noprotocol-warning.m @@ -0,0 +1,36 @@ +// RUN: clang-cc -fsyntax-only -verify %s + + +@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; +} |