diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-04-12 23:01:55 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-04-12 23:01:55 +0000 |
commit | 16a7d637dd4432cbe35b9088cc339c838c4ea64d (patch) | |
tree | 974f1e8e88679902ee783eb0164e1ba196f9b96a /clang/test | |
parent | 0a385532dd6f30ee9f666add6f3be78abe5f64b1 (diff) | |
download | bcm5719-llvm-16a7d637dd4432cbe35b9088cc339c838c4ea64d.tar.gz bcm5719-llvm-16a7d637dd4432cbe35b9088cc339c838c4ea64d.zip |
ObjC class properties: add diagnostics for unimplemented class properties.
rdar://24711047
llvm-svn: 266146
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Parser/objc-class-property.m | 1 | ||||
-rw-r--r-- | clang/test/SemaObjC/objc-class-property.m | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/clang/test/Parser/objc-class-property.m b/clang/test/Parser/objc-class-property.m index 202352c33b7..e4c3b0766b4 100644 --- a/clang/test/Parser/objc-class-property.m +++ b/clang/test/Parser/objc-class-property.m @@ -15,7 +15,6 @@ @property int z; @property(readonly) int ro, ro2; @property (class) int c; -@property (class) int c2; @end @implementation A diff --git a/clang/test/SemaObjC/objc-class-property.m b/clang/test/SemaObjC/objc-class-property.m index 37a8178ceb6..5e1b866cbc8 100644 --- a/clang/test/SemaObjC/objc-class-property.m +++ b/clang/test/SemaObjC/objc-class-property.m @@ -18,11 +18,13 @@ @property int z; @property(readonly) int ro, ro2; @property (class) int c; -@property (class) int c2; +@property (class) int c2; // expected-note {{property declared here}} \ + // expected-note {{property declared here}} @property (class) int x; @end -@implementation A +@implementation A // expected-warning {{class property 'c2' requires method 'c2' to be defined}} \ + // expected-warning {{class property 'c2' requires method 'setC2:' to be defined}} @dynamic x; // refers to the instance property @dynamic (class) x; // refers to the class property @synthesize z, c2; // expected-error {{@synthesize not allowed on a class property 'c2'}} |