llvm-project/clang/test/SemaObjC/warn-category-method-deprecated.m
Fariborz Jahanian 7e3e291b33 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
2014-08-27 20:34:29 +00:00

18 lines
353 B
Objective-C

// 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}}
}