diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-12-07 00:30:00 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-12-07 00:30:00 +0000 |
commit | 6bdeb14d5d347b17c9bde8ab39c9d69b16a56a13 (patch) | |
tree | fca289267a31bbd33d2d86c578ef42ef8f43278e /clang/test | |
parent | 61e6d987bf9d1bf661ff6655536c307e2a24fd96 (diff) | |
download | bcm5719-llvm-6bdeb14d5d347b17c9bde8ab39c9d69b16a56a13.tar.gz bcm5719-llvm-6bdeb14d5d347b17c9bde8ab39c9d69b16a56a13.zip |
objc: issue deprecated/unavailable diagnostic when
methods with these attributes are sent to receivers
of 'id' type too. // rdar://10459930
llvm-svn: 145999
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/ARCMT/checking.m | 1 | ||||
-rw-r--r-- | clang/test/SemaObjC/attr-deprecated.m | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/clang/test/ARCMT/checking.m b/clang/test/ARCMT/checking.m index 0e441cb1eb6..86afdf0b237 100644 --- a/clang/test/ARCMT/checking.m +++ b/clang/test/ARCMT/checking.m @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -arcmt-check -verify -triple x86_64-apple-darwin10 %s +// XFAIL: * #include "Common.h" 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 |