[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CXX / module / dcl.dcl / dcl.module / p5.cpp
blobca100443a4c67a9b0ef8f158add1d9ea87d243fc
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -o %t -DINTERFACE
3 // RUN: %clang_cc1 -std=c++20 -fmodule-file=Foo=%t %s -verify -DIMPLEMENTATION
4 // RUN: %clang_cc1 -std=c++20 -fmodule-file=Foo=%t %s -verify -DEARLY_IMPLEMENTATION
5 // RUN: %clang_cc1 -std=c++20 -fmodule-file=Foo=%t %s -verify -DUSER
7 // expected-no-diagnostics
9 #if defined(INTERFACE) || defined(EARLY_IMPLEMENTATION) || defined(IMPLEMENTATION)
10 module;
11 #endif
13 #ifdef USER
14 import Foo;
15 #endif
17 #ifdef EARLY_IMPLEMENTATION
18 module Foo;
19 #endif
21 template<typename T> struct type_template {
22 typedef T type;
23 void f(type);
26 template<typename T> void type_template<T>::f(type) {}
28 template<int = 0, typename = int, template<typename> class = type_template>
29 struct default_template_args {};
31 #ifdef INTERFACE
32 export module Foo;
33 #endif
35 #ifdef IMPLEMENTATION
36 module Foo;
37 #endif