mizvekov wrote:

The problem is not whether the template instantiation is a definition or not, 
if the type is required to be complete, then it needs to be a definition. If 
it's not required to be complete, then it doesn't need to be.

What happens here is that when the instantiation is needed, but not needed to 
be complete, then clang instantiates a non-definition. If the type is required 
to be complete later, then clang turns that non-definition into a definition.

When the initial selected pattern is not a definition (either because the 
definition is not the most recent declaration visible to lookup, or because the 
definition is not available yet), then clang selects a different pattern than 
the initially selected one, later when we require the type to be complete.

But the problem is that clang does an incomplete job when upgrading the 
instantiation's declaration to a definition, it doesn't update what is needed 
so that the pattern will point to the definition.


https://github.com/llvm/llvm-project/pull/156011
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to