summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-03-08 01:07:33 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-03-08 01:07:33 +0000
commit5d3310208ae811396ca0cf256f96d4234ce5ae75 (patch)
treee7978b11cce7633f20a865762d372bc5de374c8a /clang/include
parentc13d858b6dffc2b31e2348dac2fa7958f4009298 (diff)
downloadbcm5719-llvm-5d3310208ae811396ca0cf256f96d4234ce5ae75.tar.gz
bcm5719-llvm-5d3310208ae811396ca0cf256f96d4234ce5ae75.zip
When substituting previously-checked template arguments into a template
template parameter that is an expanded parameter pack, only substitute into the current slice, not the entire pack. This reduces the checking of N template template arguments for an expanded parameter pack containing N parameters from quadratic time to linear time in the length of the pack. This is important because one (and possibly the only?) general technique for splitting a template parameter pack in linear time depends on doing this. llvm-svn: 326973
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Sema/Sema.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index e73dbf85feb..65708706d74 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -6362,9 +6362,8 @@ public:
QualType InstantiatedParamType, Expr *Arg,
TemplateArgument &Converted,
CheckTemplateArgumentKind CTAK = CTAK_Specified);
- bool CheckTemplateArgument(TemplateTemplateParmDecl *Param,
- TemplateArgumentLoc &Arg,
- unsigned ArgumentPackIndex);
+ bool CheckTemplateTemplateArgument(TemplateParameterList *Params,
+ TemplateArgumentLoc &Arg);
ExprResult
BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg,
@@ -7700,6 +7699,10 @@ public:
StmtResult SubstStmt(Stmt *S,
const MultiLevelTemplateArgumentList &TemplateArgs);
+ TemplateParameterList *
+ SubstTemplateParams(TemplateParameterList *Params, DeclContext *Owner,
+ const MultiLevelTemplateArgumentList &TemplateArgs);
+
Decl *SubstDecl(Decl *D, DeclContext *Owner,
const MultiLevelTemplateArgumentList &TemplateArgs);
OpenPOWER on IntegriCloud