[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / method-prototype-scope.m
blobc581500d02c837ae1a64c206267e1d070b191e2f
1 // RUN: %clang_cc1  -fsyntax-only -Wduplicate-method-arg -verify -Wno-objc-root-class %s
3 // rdar://8877730
5 int object;
7 @class NSString, NSArray;
9 @interface Test 
10 - Func:(int)XXXX, id object; // expected-warning {{use of C-style parameters in Objective-C method declarations is deprecated}}
12 - doSomethingElseWith:(id)object;
14 - (NSString *)doSomethingWith:(NSString *)object and:(NSArray *)object; // expected-warning {{redeclaration of method parameter 'object'}} \
15                                           // expected-note {{previous declaration is here}}
16 @end
18 @implementation Test
20 - (NSString *)doSomethingWith:(NSString *)object and:(NSArray *)object // expected-warning {{redefinition of method parameter 'object'}} \
21                                           // expected-note {{previous declaration is here}}
23     return object; // expected-warning {{incompatible pointer types returning 'NSArray *' from a function with result type 'NSString *'}}
26 - Func:(int)XXXX, id object { return object; } // expected-warning {{use of C-style parameters in Objective-C method declarations is deprecated}}
28 - doSomethingElseWith:(id)object { return object; }
30 @end
32 struct P;
34 @interface Test1
35 - doSomethingWith:(struct S *)object and:(struct P *)obj; // expected-warning {{declaration of 'struct S' will not be visible outside of this function}}
36 @end
38 int obj;