[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / diagnose-missing-import.m
blob8fb8e6b25f68a5008dd551cba8450c89af3761a4
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/diagnose-missing-import \
3 // RUN:   -Werror=implicit-function-declaration -fsyntax-only \
4 // RUN:   -fimplicit-module-maps -verify %s
5 @import NCI;
7 void foo(void) {
8   XYZLogEvent(xyzRiskyCloseOpenParam, xyzRiskyCloseOpenParam); // expected-error {{call to undeclared function 'XYZLogEvent'; ISO C99 and later do not support implicit function declarations}} \
9                                                                   expected-error {{declaration of 'XYZLogEvent' must be imported}} \
10                                                                   expected-error {{declaration of 'xyzRiskyCloseOpenParam' must be imported from module 'NCI.A'}} \
11                                                                   expected-error {{declaration of 'xyzRiskyCloseOpenParam' must be imported from module 'NCI.A'}}
14 // expected-note@Inputs/diagnose-missing-import/a.h:5 {{declaration here is not visible}}
15 // expected-note@Inputs/diagnose-missing-import/a.h:5 {{declaration here is not visible}}
16 // expected-note@Inputs/diagnose-missing-import/a.h:6 {{declaration here is not visible}}