forked from OSchip/llvm-project
[Sema] ArrayRef-ize ActOnTemplateParameterList. NFC
llvm-svn: 256400
This commit is contained in:
parent
6550a4b17e
commit
96225a5298
|
@ -5583,7 +5583,7 @@ public:
|
|||
SourceLocation ExportLoc,
|
||||
SourceLocation TemplateLoc,
|
||||
SourceLocation LAngleLoc,
|
||||
Decl **Params, unsigned NumParams,
|
||||
ArrayRef<Decl *> Params,
|
||||
SourceLocation RAngleLoc);
|
||||
|
||||
/// \brief The context in which we are checking a template parameter list.
|
||||
|
|
|
@ -1974,8 +1974,8 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
|
|||
// Recover as if it were an explicit specialization.
|
||||
TemplateParameterLists FakedParamLists;
|
||||
FakedParamLists.push_back(Actions.ActOnTemplateParameterList(
|
||||
0, SourceLocation(), TemplateInfo.TemplateLoc, LAngleLoc, nullptr,
|
||||
0, LAngleLoc));
|
||||
0, SourceLocation(), TemplateInfo.TemplateLoc, LAngleLoc, None,
|
||||
LAngleLoc));
|
||||
|
||||
ThisDecl =
|
||||
Actions.ActOnTemplateDeclarator(getCurScope(), FakedParamLists, D);
|
||||
|
|
|
@ -1662,8 +1662,8 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
|
|||
// "template<>", so that we treat this construct as a class
|
||||
// template specialization.
|
||||
FakedParamLists.push_back(Actions.ActOnTemplateParameterList(
|
||||
0, SourceLocation(), TemplateInfo.TemplateLoc, LAngleLoc, nullptr,
|
||||
0, LAngleLoc));
|
||||
0, SourceLocation(), TemplateInfo.TemplateLoc, LAngleLoc, None,
|
||||
LAngleLoc));
|
||||
TemplateParams = &FakedParamLists;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,8 +126,7 @@ Parser::ParseTemplateDeclarationOrSpecialization(unsigned Context,
|
|||
Actions.ActOnTemplateParameterList(CurTemplateDepthTracker.getDepth(),
|
||||
ExportLoc,
|
||||
TemplateLoc, LAngleLoc,
|
||||
TemplateParams.data(),
|
||||
TemplateParams.size(), RAngleLoc));
|
||||
TemplateParams, RAngleLoc));
|
||||
|
||||
if (!TemplateParams.empty()) {
|
||||
isSpecialization = false;
|
||||
|
@ -280,8 +279,8 @@ Parser::ParseSingleDeclarationAfterTemplate(
|
|||
// Recover as if it were an explicit specialization.
|
||||
TemplateParameterLists FakedParamLists;
|
||||
FakedParamLists.push_back(Actions.ActOnTemplateParameterList(
|
||||
0, SourceLocation(), TemplateInfo.TemplateLoc, LAngleLoc, nullptr,
|
||||
0, LAngleLoc));
|
||||
0, SourceLocation(), TemplateInfo.TemplateLoc, LAngleLoc, None,
|
||||
LAngleLoc));
|
||||
|
||||
return ParseFunctionDefinition(
|
||||
DeclaratorInfo, ParsedTemplateInfo(&FakedParamLists,
|
||||
|
@ -631,8 +630,7 @@ Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) {
|
|||
TemplateParameterList *ParamList =
|
||||
Actions.ActOnTemplateParameterList(Depth, SourceLocation(),
|
||||
TemplateLoc, LAngleLoc,
|
||||
TemplateParams.data(),
|
||||
TemplateParams.size(),
|
||||
TemplateParams,
|
||||
RAngleLoc);
|
||||
|
||||
// Grab a default argument (if available).
|
||||
|
|
|
@ -814,14 +814,14 @@ Sema::ActOnTemplateParameterList(unsigned Depth,
|
|||
SourceLocation ExportLoc,
|
||||
SourceLocation TemplateLoc,
|
||||
SourceLocation LAngleLoc,
|
||||
Decl **Params, unsigned NumParams,
|
||||
ArrayRef<Decl *> Params,
|
||||
SourceLocation RAngleLoc) {
|
||||
if (ExportLoc.isValid())
|
||||
Diag(ExportLoc, diag::warn_template_export_unsupported);
|
||||
|
||||
return TemplateParameterList::Create(Context, TemplateLoc, LAngleLoc,
|
||||
(NamedDecl**)Params, NumParams,
|
||||
RAngleLoc);
|
||||
(NamedDecl**)Params.data(),
|
||||
Params.size(), RAngleLoc);
|
||||
}
|
||||
|
||||
static void SetNestedNameSpecifier(TagDecl *T, const CXXScopeSpec &SS) {
|
||||
|
|
Loading…
Reference in New Issue