diff options
Diffstat (limited to 'clang/test/SemaObjC/attr-deprecated.m')
-rw-r--r-- | clang/test/SemaObjC/attr-deprecated.m | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/clang/test/SemaObjC/attr-deprecated.m b/clang/test/SemaObjC/attr-deprecated.m index e90bbf94eab..571bd30e123 100644 --- a/clang/test/SemaObjC/attr-deprecated.m +++ b/clang/test/SemaObjC/attr-deprecated.m @@ -53,7 +53,7 @@ void t1(A *a) void t2(id a) { - [a f]; + [a f]; // expected-warning {{'f' is deprecated}} } void t3(A<P>* a) @@ -121,3 +121,20 @@ void test(Test2 *foo) { __attribute__((deprecated)) @interface A(Blah) // expected-error{{attributes may not be specified on a category}} @end + +// rdar://10459930 + +@class NSString; +@interface NSDocumentController +{ + id iv; +} +- (void)fileExtensionsFromType:(NSString *)typeName __attribute__((deprecated)); +@end + +@implementation NSDocumentController +- (void) Meth { + [iv fileExtensionsFromType:@"public.text"]; // expected-warning {{'fileExtensionsFromType:' is deprecated}} +} +- (void)fileExtensionsFromType:(NSString *)typeName {} +@end |