1 // RUN: rm -rf %t 2 // RUN: mkdir %t 3 // RUN: split-file %s %t 4 // 5 // RUN: %clang_cc1 -std=c++20 -fmodules -fmodule-name=mod -xc++ -emit-module %t/mod.cppmap -o %t/mod.pcm 6 // RUN: %clang_cc1 -std=c++20 -fmodules -fmodule-file=%t/mod.pcm -fsyntax-only %t/use.cc -verify 7 8 //--- mod.cppmap 9 module "mod" { 10 export * 11 header "mod.h" 12 } 13 14 //--- mod.h 15 #ifndef MOD 16 #define MOD 17 #include "templ.h" 18 #endif 19 20 //--- templ.h 21 #ifndef TEMPL 22 #define TEMPL 23 template <typename t1 = void> 24 inline constexpr bool inl = false; 25 #endif 26 27 //--- use.cc 28 // expected-no-diagnostics 29 #include "templ.h" 30 #include "mod.h" 31