31 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 -fmodules -fmodule-name=mod -xc++ -emit-module %t/mod.cppmap -o %t/mod.pcm6// RUN: %clang_cc1 -std=c++20 -fmodules -fmodule-file=%t/mod.pcm -fsyntax-only %t/use.cc -verify7 8//--- mod.cppmap9module "mod" {10 export *11 header "mod.h"12}13 14//--- mod.h15#ifndef MOD16#define MOD17#include "templ.h"18#endif19 20//--- templ.h21#ifndef TEMPL22#define TEMPL23template <typename t1 = void>24inline constexpr bool inl = false;25#endif26 27//--- use.cc28// expected-no-diagnostics29#include "templ.h"30#include "mod.h"31