[flang][cuda] Do not register global constants (#118582)
[llvm-project.git] / clang / test / Modules / GH77953.cpp
blobc0c16f00395bce1d882a3bc33ef4cbca192a5c8e
1 // From https://github.com/llvm/llvm-project/issues/77953
2 // RUN: rm -rf %t
3 // RUN: mkdir -p %t
4 // RUN: split-file %s %t
6 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm
7 // RUN: %clang_cc1 -std=c++20 -fmodule-file=a=%t/a.pcm %t/b.cpp -fsyntax-only -verify
9 //--- a.cppm
10 export module a;
12 template<typename, typename>
13 concept c = true;
15 export template<typename... Ts>
16 struct a {
17 template<typename... Us> requires(... and c<Ts, Us>)
18 friend bool operator==(a, a<Us...>) {
19 return true;
23 template struct a<>;
25 //--- b.cpp
26 // expected-no-diagnostics
27 import a;
28 template struct a<int>;