[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / clang / test / Modules / Reachability-template-instantiation.cpp
blob6f363ed00b6e36626edd63ee2e35ec73fbc13991
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/Templ.cppm -emit-module-interface -o %t/Templ.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/Use.cppm -fprebuilt-module-path=%t -emit-module-interface -o %t/Use.pcm
7 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -I%t %t/Use.cpp -verify -fsyntax-only
9 // RUN: %clang_cc1 -std=c++20 %t/Templ.cppm -emit-reduced-module-interface -o %t/Templ.pcm
10 // RUN: %clang_cc1 -std=c++20 %t/Use.cppm -fprebuilt-module-path=%t -emit-reduced-module-interface -o %t/Use.pcm
11 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -I%t %t/Use.cpp -verify -fsyntax-only
13 //--- Templ.h
14 #ifndef TEMPL_H
15 #define TEMPL_H
16 template <class T>
17 class Wrapper {
18 public:
19 T value;
21 #endif
23 //--- Templ.cppm
24 export module Templ;
25 export template <class T>
26 class Wrapper2 {
27 public:
28 T value;
31 //--- Use.cppm
32 module;
33 #include "Templ.h"
34 export module Use;
35 import Templ;
37 export template <class T>
38 class Use {
39 public:
40 Wrapper<T> value;
41 Wrapper2<T> value2;
44 export template <class T>
45 Wrapper<T> wrapper;
47 //--- Use.cpp
48 // expected-no-diagnostics
49 module;
50 #include "Templ.h"
51 export module User;
53 export template <class T>
54 class User {
55 public:
56 Wrapper<T> value;