xref: /llvm-project/clang/test/Modules/implicit-module-remap.cpp (revision 874a5dab419240af0a02a3fc70accd926105aa31)
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: cd %t
4 //
5 // RUN: %clang_cc1 -fmodules -fmodule-map-file=module.modulemap -fmodules-cache-path=%t -remap-file "test.cpp;%t/test.cpp"  %t/test.cpp
6 
7 //--- a.h
8 #define FOO
9 
10 //--- module.modulemap
11 module a {
12   header "a.h"
13 }
14 
15 //--- test.cpp
16 #include "a.h"
17 
18 #ifndef FOO
19 #error foo
20 #endif
21 
22