diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2014-08-27 20:34:29 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-08-27 20:34:29 +0000 |
| commit | 7e3e291b333df01902ed79482c39d0f330bb60a9 (patch) | |
| tree | ec70d917d49759d51c67bcdc900774440cae2bf0 /clang/test/SemaObjC | |
| parent | 1d23bac843fd9f1df8473041d44af80550e436a6 (diff) | |
| download | bcm5719-llvm-7e3e291b333df01902ed79482c39d0f330bb60a9.tar.gz bcm5719-llvm-7e3e291b333df01902ed79482c39d0f330bb60a9.zip | |
Objective-C. Change to method lookup rules to look
into primary class's named categories before looking
into their protocols. This is because categories are
part of the public interface and , just as primary class,
preference should be given to them before class
(and category) protocols. // rdar://18013929
llvm-svn: 216610
Diffstat (limited to 'clang/test/SemaObjC')
| -rw-r--r-- | clang/test/SemaObjC/warn-category-method-deprecated.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/warn-category-method-deprecated.m b/clang/test/SemaObjC/warn-category-method-deprecated.m new file mode 100644 index 00000000000..349a27a795c --- /dev/null +++ b/clang/test/SemaObjC/warn-category-method-deprecated.m @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s +// rdar://18013929 + +@protocol P +- (void)meth; +@end + +@interface I <P> +@end + +@interface I(cat) +- (void)meth __attribute__((deprecated)); // expected-note {{'meth' has been explicitly marked deprecated here}} +@end + +void foo(I *i) { + [i meth]; // expected-warning {{'meth' is deprecated}} +} |

