diff options
Diffstat (limited to 'test/SemaObjC/attr-deprecated.m')
-rw-r--r-- | test/SemaObjC/attr-deprecated.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m index c0aa9fc..aa4b479 100644 --- a/test/SemaObjC/attr-deprecated.m +++ b/test/SemaObjC/attr-deprecated.m @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s @interface A { int X __attribute__((deprecated)); // expected-note 2 {{declared here}} @@ -135,3 +136,21 @@ typedef struct { @property footype c; // expected-warning {{'footype' is deprecated}} @property footype d __attribute((deprecated)); @end + +// rdar://13569424 +@interface NewI ++(void)cmeth; +@end + +typedef NewI DeprI __attribute__((deprecated("blah"))); // expected-note 4 {{'DeprI' declared here}} + +@interface SI : DeprI // expected-warning {{'DeprI' is deprecated: blah}} +-(DeprI*)meth; // expected-warning {{'DeprI' is deprecated: blah}} +@end + +@implementation SI +-(DeprI*)meth { // expected-warning {{'DeprI' is deprecated: blah}} + [DeprI cmeth]; // expected-warning {{'DeprI' is deprecated: blah}} + return 0; +} +@end |