Open Quuxplusone opened 3 years ago
Bugzilla Link | PR52229 |
Status | CONFIRMED |
Importance | P normal |
Reported by | Thiago Macieira (thiago@kde.org) |
Reported on | 2021-10-19 14:11:34 -0700 |
Last modified on | 2021-10-19 15:06:26 -0700 |
Version | trunk |
Hardware | PC Linux |
CC | blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Confirmed. We're already computing the linkage and visibility of the template argument and using it to determine the linkage and visibility of the template specialization, but we don't seem to use that information to determine the linkage and visibility of the template parameter object.
Another similar case we should make sure we handle properly:
struct Foo { int *i; }; namespace { int n; }
template <Foo f> void test() {
// ...
}
// Should result in an internal linkage template parameter object.
void test() { test<Foo{&n}>(); }
Please ignore the too-many-ff output (should have used unsigned char).
BTW, my first attempt when I was told of this issue was to test with template