diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-03-02 21:50:02 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-03-02 21:50:02 +0000 |
commit | 7923ef41e18bf9fd31b2753cb026874001c36eb0 (patch) | |
tree | 30d65e1f685173b60030f16494633e07d997bec5 /clang/test | |
parent | a748664c9d8e0aa7c12b141f8fc81304e345be05 (diff) | |
download | bcm5719-llvm-7923ef41e18bf9fd31b2753cb026874001c36eb0.tar.gz bcm5719-llvm-7923ef41e18bf9fd31b2753cb026874001c36eb0.zip |
objc: When issue diagnostic about deprecated method, also
issue the note if it is because message is sent to a forward class
declaration in delayed diagnostic. // rdar://10290322
llvm-svn: 151942
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaObjC/warn-forward-class-attr-deprecated.m | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/warn-forward-class-attr-deprecated.m b/clang/test/SemaObjC/warn-forward-class-attr-deprecated.m new file mode 100644 index 00000000000..26e019627c4 --- /dev/null +++ b/clang/test/SemaObjC/warn-forward-class-attr-deprecated.m @@ -0,0 +1,24 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify +// rdar://10290322 + +@class ABGroupImportFilesScope; // expected-note {{forward declaration of class here}} + +@interface I1 +- (id) filenames __attribute__((deprecated)); +@end + +@interface I2 +- (id) Meth : (ABGroupImportFilesScope*) scope; +- (id) filenames __attribute__((deprecated)); +- (id)initWithAccount: (id)account filenames:(id)filenames; +@end + +@implementation I2 +- (id) Meth : (ABGroupImportFilesScope*) scope +{ + id p = [self initWithAccount : 0 filenames :[scope filenames]]; // expected-warning {{'filenames' maybe deprecated because receiver type is unknown}} + return 0; +} +- (id) filenames { return 0; } +- (id)initWithAccount: (id)account filenames:(id)filenames { return 0; } +@end |