[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)
Andrew Ng via cfe-commits
cfe-commits at lists.llvm.org
Wed May 29 08:17:03 PDT 2024
nga888 wrote:
> Well, you're exporting a specialization. How is it going to get imported?
The "importing" side is just:
```
struct s {
template <bool b = true> static bool f();
};
bool use_f() { return s::f(); }
```
This test case was derived from code that is part of UnrealEngine 5.4 which builds fine with MSVC, i.e. no undefined symbol for `s::f<true>()`.
> Anyway, my point is that your patch is only working around half the bug. It seems to me that the proper fix has to be to get the attributes right in the AST.
So in this test case for exported template specializations, there isn't really another "half" to the issue.
https://github.com/llvm/llvm-project/pull/93302
More information about the cfe-commits
mailing list