Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Import default template args #341

Closed

Conversation

martong
Copy link

@martong martong commented Mar 21, 2018

Fixes #310

@martong martong requested review from Xazax-hun and balazske March 21, 2018 17:21
@martong martong force-pushed the import_default_templ_args branch from ec8f774 to a7ba003 Compare March 21, 2018 17:22
Copy link

@Xazax-hun Xazax-hun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about value templates with default arguments?

@@ -4174,7 +4174,7 @@ Decl *ASTNodeImporter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) {
// is created.

// FIXME: Import default argument.
return TemplateTypeParmDecl::Create(Importer.getToContext(),
auto ToD = TemplateTypeParmDecl::Create(Importer.getToContext(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixme above is no longer relevant.

@martong martong force-pushed the import_default_templ_args branch from a7ba003 to f2cc841 Compare March 22, 2018 08:56
@martong martong force-pushed the import_default_templ_args branch from f2cc841 to e75e4b6 Compare March 22, 2018 09:19
@martong
Copy link
Author

martong commented Mar 22, 2018

Added new test for this case:

      template<typename T0, typename T1 = int> class A;
      template<typename T0 = int, typename T1> class A;

Added new test for VarTemplateDecl.

Copy link
Collaborator

@balazske balazske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, but only type kind of template arguments are used at the test. Does it work similarly with value and template type of arguments?

@dkrupp dkrupp added this to the April 2 milestone Mar 26, 2018
@dkrupp dkrupp modified the milestones: April 2, apr 16 Apr 9, 2018
@dkrupp dkrupp removed this from the apr 16 milestone May 14, 2018
@gamesh411
Copy link
Collaborator

Can one of the admins verify this patch?

@martong
Copy link
Author

martong commented Nov 19, 2018

Not important for a while, because all specializations/instantiations have the concrete parameter. We did not see any error caused by this.

@martong martong closed this Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants