ASTContext::getCanonicalTemplateTemplateParmDecl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ASTContext::getCanonicalTemplateTemplateParmDecl

David Blaikie via cfe-dev
Hello!

I want to figure out how the ASTContext::getCanonicalTemplateTemplateParmDecl function should work. For a class template partial specialization object and TemplateTemplateParmDecl in a TemplateArgument, the function is called from getCanonicalTemplateArgument. It creates a new not initialized TemplateTemplateParmDecl object that is used in the new TemplateName and TemplateArgument. The TemplateName now contains an uninitialized TemplateTemplateParmDecl that is not linked to the old (and correct) TemplateTemplateParmDecl. At least when the function is called from ASTReader::ReadTemplateArgument. 

Can somebody tell if this is a bug or how the code (ReadTemplateArgument if Canonicalize==true) should work? This code was introduced in commit 47ba20a ("[modules] When loading a template specialization, re-canonicalize its…") years ago.

Regards,
Balázs



_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev