diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 56d91b49b13fe55c918afbda19f6165b5fbff87a (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaObjC/attr-deprecated.m | |
parent | 41e20f564abdb05101d6b2b29c59459a966c22cc (diff) | |
download | src-56d91b49b13fe55c918afbda19f6165b5fbff87a.tar.gz src-56d91b49b13fe55c918afbda19f6165b5fbff87a.zip |
Notes
Diffstat (limited to 'test/SemaObjC/attr-deprecated.m')
-rw-r--r-- | test/SemaObjC/attr-deprecated.m | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m index db0b958f8dd4..260462abc0b8 100644 --- a/test/SemaObjC/attr-deprecated.m +++ b/test/SemaObjC/attr-deprecated.m @@ -1,10 +1,10 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s @interface A { - int X __attribute__((deprecated)); + int X __attribute__((deprecated)); // expected-note 2 {{declared here}} } -+ (void)F __attribute__((deprecated)); -- (void)f __attribute__((deprecated)); ++ (void)F __attribute__((deprecated)); // expected-note 2 {{declared here}} +- (void)f __attribute__((deprecated)); // expected-note 4 {{declared here}} @end @implementation A @@ -42,7 +42,7 @@ @end @protocol P -- (void)p __attribute__((deprecated)); +- (void)p __attribute__((deprecated)); // expected-note {{declared here}} @end void t1(A *a) @@ -71,7 +71,7 @@ void t4(Class c) @interface Bar -@property (assign, setter = MySetter:) int FooBar __attribute__ ((deprecated)); +@property (assign, setter = MySetter:) int FooBar __attribute__ ((deprecated)); // expected-note 2 {{declared here}} - (void) MySetter : (int) value; @end @@ -83,7 +83,7 @@ int t5() { __attribute ((deprecated)) -@interface DEPRECATED { +@interface DEPRECATED { // expected-note 2 {{declared here}} @public int ivar; DEPRECATED *ivar2; // no warning. } @@ -107,7 +107,7 @@ __attribute ((deprecated)) @interface Test2 -@property int test2 __attribute__((deprecated)); +@property int test2 __attribute__((deprecated)); // expected-note 4 {{declared here}} @end void test(Test2 *foo) { @@ -121,3 +121,16 @@ void test(Test2 *foo) { __attribute__((deprecated)) @interface A(Blah) // expected-error{{attributes may not be specified on a category}} @end + + +typedef struct { + int x; +} footype __attribute((deprecated)); // expected-note 2 {{declared here}} + +@interface foo { + footype a; // expected-warning {{'footype' is deprecated}} + footype b __attribute((deprecated)); +} +@property footype c; // expected-warning {{'footype' is deprecated}} +@property footype d __attribute((deprecated)); +@end |