Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Modules / Reachability-using-templates.cpp
blobf530e15bd4d2ba454b1f2ec88d149992822e4685
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/mod.templates.cppm -emit-module-interface -o %t/mod.templates.pcm
6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -fsyntax-only -verify
7 //
8 //--- mod.templates.cppm
9 export module mod.templates;
10 template <class> struct t {};
11 export template <class T> using u = t<T>;
13 //--- Use.cpp
14 // expected-no-diagnostics
15 import mod.templates;
16 void foo() {
17 u<int> v{};