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 sixth batch of tests being updated (there are a significant number of other tests left to be updated).
38 lines
691 B
Objective-C
38 lines
691 B
Objective-C
// Objective-C recovery
|
|
// RUN: cp %s %t
|
|
// RUN: not %clang_cc1 -fixit -x objective-c %t
|
|
// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c %t
|
|
|
|
// Objective-C++ recovery
|
|
// RUN: cp %s %t
|
|
// RUN: not %clang_cc1 -fixit -x objective-c++ %t -std=c++11
|
|
// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c++ %t -std=c++11
|
|
// rdar://9603056
|
|
|
|
@interface S @end
|
|
|
|
@interface NSArray
|
|
{
|
|
@public
|
|
S iS;
|
|
}
|
|
+ (id) arrayWithObjects;
|
|
@end
|
|
|
|
NSArray func(void) {
|
|
NSArray P;
|
|
return P;
|
|
}
|
|
|
|
NSArray (func2)(void) { return 0; }
|
|
|
|
#ifdef __cplusplus
|
|
void test_result_type() {
|
|
auto l1 = [] () -> NSArray { return 0; };
|
|
}
|
|
#endif
|
|
|
|
int main(void) {
|
|
NSArray pluginNames = [NSArray arrayWithObjects];
|
|
}
|