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