clang/test/SemaObjC/warn-category-method-deprecated.m
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s |
| 2 | |
| 3 | @protocol P |
| 4 | - (void)meth; |
| 5 | @end |
| 6 | |
| 7 | @interface I <P> |
| 8 | @end |
| 9 | |
| 10 | @interface I(cat) |
| 11 | - (void)meth __attribute__((deprecated)); // expected-note {{'meth' has been explicitly marked deprecated here}} |
| 12 | @end |
| 13 | |
| 14 | void foo(I *i) { |
| 15 | [i meth]; // expected-warning {{'meth' is deprecated}} |
| 16 | } |