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 seventh batch of tests being updated (there are a significant number of other tests left to be updated).
19 lines
764 B
Objective-C
19 lines
764 B
Objective-C
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/ModuleMapLocations/Module_ModuleMap -I %S/Inputs/ModuleMapLocations/Both -F %S/Inputs/ModuleMapLocations -I %S/Inputs/ModuleMapLocations -F %S/Inputs -x objective-c -fsyntax-only %s -verify -Wno-private-module
|
|
|
|
// regular
|
|
@import module_modulemap;
|
|
@import both;
|
|
// framework
|
|
@import Module_ModuleMap_F;
|
|
@import Module_ModuleMap_F.Private;
|
|
@import Both_F;
|
|
@import Inferred;
|
|
|
|
void test(void) {
|
|
will_be_found1();
|
|
wont_be_found1(); // expected-warning{{implicit declaration of function 'wont_be_found1' is invalid in C99}}
|
|
will_be_found2();
|
|
wont_be_found2(); // expected-warning{{implicit declaration of function 'wont_be_found2' is invalid in C99}}
|
|
}
|