mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

Generally we'll use `-fsyntax-only` when it is sufficient and we'll use `expected-no-diagnostics` to test the behavior doesn't trigger any problems. This patch applies these two improvements to `clang/test/Modules/GH77953.cpp`.
29 lines
616 B
C++
29 lines
616 B
C++
// From https://github.com/llvm/llvm-project/issues/77953
|
|
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: split-file %s %t
|
|
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -fmodule-file=a=%t/a.pcm %t/b.cpp -fsyntax-only -verify
|
|
|
|
//--- a.cppm
|
|
export module a;
|
|
|
|
template<typename, typename>
|
|
concept c = true;
|
|
|
|
export template<typename... Ts>
|
|
struct a {
|
|
template<typename... Us> requires(... and c<Ts, Us>)
|
|
friend bool operator==(a, a<Us...>) {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
template struct a<>;
|
|
|
|
//--- b.cpp
|
|
// expected-no-diagnostics
|
|
import a;
|
|
template struct a<int>;
|