A significant number of our tests in C accidentally use functions without prototypes. This patch converts the function signatures to have a prototype for the situations where the test is not specific to K&R C declarations. e.g., void func(); becomes void func(void); This is the fourth batch of tests being updated (there are a significant number of other tests left to be updated).
29 lines
451 B
Objective-C
29 lines
451 B
Objective-C
// RUN: %clang_cc1 -Wselector -x objective-c %s -include %s -verify
|
|
// expected-no-diagnostics
|
|
// rdar://16600230
|
|
|
|
#ifndef INCLUDED
|
|
#define INCLUDED
|
|
|
|
#pragma clang system_header
|
|
|
|
@interface NSObject @end
|
|
@interface NSString @end
|
|
|
|
@interface NSString (NSStringExtensionMethods)
|
|
- (void)compare:(NSString *)string;
|
|
@end
|
|
|
|
@interface MyObject : NSObject
|
|
@end
|
|
|
|
#else
|
|
int main(void) {
|
|
(void)@selector(compare:);
|
|
}
|
|
|
|
@implementation MyObject
|
|
|
|
@end
|
|
#endif
|