// RUN: %clang_cc1 -fsyntax-only -Wduplicate-method-arg -verify -Wno-objc-root-class %s
// rdar://8877730
int object;@classNSString,NSArray;@interfaceTest- Func:(int)XXXX, id object;// expected-warning {{use of C-style parameters in Objective-C method declarations is deprecated}}
- doSomethingElseWith:(id)object;- (NSString*)doSomethingWith:(NSString*)objectand:(NSArray*)object;// expected-warning {{redeclaration of method parameter 'object'}} \
// expected-note {{previous declaration is here}}
@end@implementationTest- (NSString*)doSomethingWith:(NSString*)objectand:(NSArray*)object// expected-warning {{redefinition of method parameter 'object'}} \
// expected-note {{previous declaration is here}}
{return object;// expected-warning {{incompatible pointer types returning 'NSArray *' from a function with result type 'NSString *'}}
}- Func:(int)XXXX, id object {return object;}// expected-warning {{use of C-style parameters in Objective-C method declarations is deprecated}}
- doSomethingElseWith:(id)object{return object;}@endstruct P;@interfaceTest1- doSomethingWith:(struct S *)objectand:(struct P *)obj;// expected-warning {{declaration of 'struct S' will not be visible outside of this function}}
@endint obj;