[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / warn-protocol-method-deprecated.m
blob70dd394845ce1fda13502f829b7fc16c304592cf
1 // RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s
2 // rdar://11618852
4 @protocol TestProtocol 
5 - (void)newProtocolMethod;
6 - (void)deprecatedProtocolMethod __attribute__((deprecated)); // expected-note 2 {{'deprecatedProtocolMethod' has been explicitly marked deprecated here}}
7 @end
9 @interface NSObject @end
11 @interface TestClass : NSObject <TestProtocol>
13 - (void)newInstanceMethod;
14 - (void)deprecatedInstanceMethod __attribute__((deprecated)); // expected-note {{'deprecatedInstanceMethod' has been explicitly marked deprecated here}}
16 @end
18 int main(int argc, const char * argv[])
21     TestClass *testObj = (TestClass*)0;
22     [testObj newInstanceMethod];
23     [testObj deprecatedInstanceMethod]; // expected-warning {{'deprecatedInstanceMethod' is deprecated}}
25     [testObj newProtocolMethod];
26     [testObj deprecatedProtocolMethod]; // expected-warning {{'deprecatedProtocolMethod' is deprecated}}
28     id <TestProtocol> testProto = testObj;
29     [testProto newProtocolMethod];
30     [testProto deprecatedProtocolMethod]; // expected-warning {{'deprecatedProtocolMethod' is deprecated}}
31     return 0;