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).
15 lines
911 B
Objective-C
15 lines
911 B
Objective-C
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/diagnose-missing-import \
|
|
// RUN: -Werror=implicit-function-declaration -fsyntax-only \
|
|
// RUN: -fimplicit-module-maps -verify %s
|
|
@import NCI;
|
|
|
|
void foo(void) {
|
|
XYZLogEvent(xyzRiskyCloseOpenParam, xyzRiskyCloseOpenParam); // expected-error {{implicit declaration of function 'XYZLogEvent'}} expected-error {{declaration of 'XYZLogEvent' must be imported}} expected-error {{declaration of 'xyzRiskyCloseOpenParam' must be imported from module 'NCI.A'}} expected-error {{declaration of 'xyzRiskyCloseOpenParam' must be imported from module 'NCI.A'}}
|
|
}
|
|
|
|
// expected-note@Inputs/diagnose-missing-import/a.h:5 {{declaration here is not visible}}
|
|
// expected-note@Inputs/diagnose-missing-import/a.h:5 {{declaration here is not visible}}
|
|
// expected-note@Inputs/diagnose-missing-import/a.h:6 {{declaration here is not visible}}
|
|
|