Close https://github.com/llvm/llvm-project/issues/119947 As discussed in the above thread, we shouldn't write specializations with local args in reduced BMI. Since users can't find such specializations any way.
55 lines
599 B
C++
55 lines
599 B
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: split-file %s %t
|
|
//
|
|
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm
|
|
// RUN: %clang_cc1 -std=c++20 %t/use.cpp -fprebuilt-module-path=%t -emit-llvm -o -
|
|
|
|
|
|
//--- a.cppm
|
|
export module a;
|
|
|
|
struct a_inner {
|
|
~a_inner() {
|
|
}
|
|
void f(auto) {
|
|
}
|
|
};
|
|
|
|
export template<typename T>
|
|
struct a {
|
|
a() {
|
|
struct local {};
|
|
inner.f(local());
|
|
}
|
|
private:
|
|
a_inner inner;
|
|
};
|
|
|
|
|
|
namespace {
|
|
|
|
struct s {
|
|
};
|
|
|
|
} // namespace
|
|
|
|
void f() {
|
|
a<s> x;
|
|
}
|
|
|
|
//--- use.cpp
|
|
import a;
|
|
|
|
namespace {
|
|
|
|
struct s {
|
|
};
|
|
|
|
} // namespace
|
|
|
|
void g() {
|
|
a<s> x;
|
|
}
|
|
|