Implement parsing, semantic analysis and ASTs for default template
arguments. This commit covers checking and merging default template
arguments from previous declarations, but it does not cover the actual
use of default template arguments when naming class template
specializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64229 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index e3d132e..669fd92 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -1490,9 +1490,17 @@
IdentifierInfo *ParamName,
SourceLocation ParamNameLoc,
unsigned Depth, unsigned Position);
+ virtual void ActOnTypeParameterDefault(DeclTy *TypeParam,
+ SourceLocation EqualLoc,
+ SourceLocation DefaultLoc,
+ TypeTy *Default);
+
virtual DeclTy *ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
unsigned Depth,
unsigned Position);
+ virtual void ActOnNonTypeTemplateParameterDefault(DeclTy *TemplateParam,
+ SourceLocation EqualLoc,
+ ExprArg Default);
virtual DeclTy *ActOnTemplateTemplateParameter(Scope *S,
SourceLocation TmpLoc,
TemplateParamsTy *Params,
@@ -1500,6 +1508,10 @@
SourceLocation ParamNameLoc,
unsigned Depth,
unsigned Position);
+ virtual void ActOnTemplateTemplateParameterDefault(DeclTy *TemplateParam,
+ SourceLocation EqualLoc,
+ ExprArg Default);
+
virtual TemplateParamsTy *
ActOnTemplateParameterList(unsigned Depth,
SourceLocation ExportLoc,
@@ -1507,7 +1519,9 @@
SourceLocation LAngleLoc,
DeclTy **Params, unsigned NumParams,
SourceLocation RAngleLoc);
-
+ bool CheckTemplateParameterList(TemplateParameterList *NewParams,
+ TemplateParameterList *OldParams);
+
virtual DeclTy *
ActOnClassTemplate(Scope *S, unsigned TagSpec, TagKind TK,
SourceLocation KWLoc, const CXXScopeSpec &SS,