xref: /minix3/external/bsd/llvm/dist/clang/test/Modules/modular_maps.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: rm -rf %t
2*0a6a1f1dSLionel Sambuc //
3*0a6a1f1dSLionel Sambuc // RxN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=%S/Inputs/modular_maps/modulea.map -fmodule-map-file=%S/Inputs/modular_maps/modulec.map -I %S/Inputs/modular_maps %s -verify
4*0a6a1f1dSLionel Sambuc // RxN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=%S/Inputs/modular_maps/modulec.map -fmodule-map-file=%S/Inputs/modular_maps/modulea.map -I %S/Inputs/modular_maps %s -verify
5*0a6a1f1dSLionel Sambuc //
6*0a6a1f1dSLionel Sambuc // RxN: cd %S
7*0a6a1f1dSLionel Sambuc // RxN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulea.map -fmodule-map-file=Inputs/modular_maps/modulec.map -I Inputs/modular_maps %s -verify
8*0a6a1f1dSLionel Sambuc // RxN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulec.map -fmodule-map-file=Inputs/modular_maps/modulea.map -I Inputs/modular_maps %s -verify
9*0a6a1f1dSLionel Sambuc //
10*0a6a1f1dSLionel Sambuc // RUN: cd %S
11*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulea-cwd.map -fmodule-map-file=Inputs/modular_maps/modulec-cwd.map -I Inputs/modular_maps %s -verify -fmodule-map-file-home-is-cwd
12*0a6a1f1dSLionel Sambuc // RxN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulec-cwd.map -fmodule-map-file=Inputs/modular_maps/modulea-cwd.map -I Inputs/modular_maps %s -verify -fmodule-map-file-home-is-cwd
13*0a6a1f1dSLionel Sambuc 
14*0a6a1f1dSLionel Sambuc // chdir is unsupported on Lit internal runner.
15*0a6a1f1dSLionel Sambuc // REQUIRES: shell
16f4a2713aSLionel Sambuc 
17f4a2713aSLionel Sambuc #include "common.h"
18f4a2713aSLionel Sambuc #include "a.h"
19f4a2713aSLionel Sambuc #include "b.h" // expected-error {{private header}}
20*0a6a1f1dSLionel Sambuc @import C;
21*0a6a1f1dSLionel Sambuc const int v = a + c + x;
22*0a6a1f1dSLionel Sambuc const int val = a + b + c + x; // expected-error {{undeclared identifier}}
23