ilya-biryukov wrote:
> @ilya-biryukov When instantiating a template from a member template that was
> explicitly specialized for a given implicitly instantiated specialization of
> its enclosing class template, we need to keep track of which template was
> actually used as the primary template (since we consider the specialization
> to be a redeclaration of the (instantiated) member template). Since the
> initial declaration & the specialized declaration have different template
> depths, this (may) result in `getTemplateInstantiationArgs` returning an
> incomplete set of template arguments for an entity.
so this is for cases like this, right?
```cpp
template <class T>
struct Foo {
template <class>
struct Bar {
int foo = 10;
};
};
template <>
template <class T>
struct Foo<int>::Bar {
int foo = 10;
};
```
who do we strictly need to change what we pick in the simpler cases above? (my
guess would be that we want simpler code, but I want to confirm it)
Do you have any ideas on how to revert back to the old behavior? In the code
example above, I would've expected that using canonical declaration after
getting template instantiation pattern would give us the same results as before.
Any idea why that isn't happening?
https://github.com/llvm/llvm-project/pull/111852
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits