TemplateDeclInstantiator takes the MultiLevelArgumentList by const-ref
and stores a const-ref member. Thus, we must not pass a temporary
into the constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191665
91177308-0d34-0410-b5e6-
96231b3b80d8
// we want to instantiate a definition.
FromVar = FromVar->getFirstDeclaration();
- TemplateDeclInstantiator Instantiator(
- *this, FromVar->getDeclContext(),
- MultiLevelTemplateArgumentList(TemplateArgList));
+ MultiLevelTemplateArgumentList MultiLevelList(TemplateArgList);
+ TemplateDeclInstantiator Instantiator(*this, FromVar->getDeclContext(),
+ MultiLevelList);
// TODO: Set LateAttrs and StartingScope ...