|
@@ -2563,8 +2563,7 @@ void Sema::MergeVarDecl(VarDecl *New, LookupResult &Previous) {
|
|
|
/// no declarator (e.g. "struct foo;") is parsed.
|
|
|
Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
|
|
|
DeclSpec &DS) {
|
|
|
- return ParsedFreeStandingDeclSpec(S, AS, DS,
|
|
|
- MultiTemplateParamsArg(*this, 0, 0));
|
|
|
+ return ParsedFreeStandingDeclSpec(S, AS, DS, MultiTemplateParamsArg());
|
|
|
}
|
|
|
|
|
|
/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with
|
|
@@ -3423,7 +3422,7 @@ static bool RebuildDeclaratorInCurrentInstantiation(Sema &S, Declarator &D,
|
|
|
|
|
|
Decl *Sema::ActOnDeclarator(Scope *S, Declarator &D) {
|
|
|
D.setFunctionDefinitionKind(FDK_Declaration);
|
|
|
- Decl *Dcl = HandleDeclarator(S, D, MultiTemplateParamsArg(*this));
|
|
|
+ Decl *Dcl = HandleDeclarator(S, D, MultiTemplateParamsArg());
|
|
|
|
|
|
if (OriginalLexicalContext && OriginalLexicalContext->isObjCContainer() &&
|
|
|
Dcl && Dcl->getDeclContext()->isFileContext())
|
|
@@ -4215,7 +4214,7 @@ Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
|
|
D.getDeclSpec().getLocStart(),
|
|
|
D.getIdentifierLoc(),
|
|
|
D.getCXXScopeSpec(),
|
|
|
- TemplateParamLists.get(),
|
|
|
+ TemplateParamLists.data(),
|
|
|
TemplateParamLists.size(),
|
|
|
/*never a friend*/ false,
|
|
|
isExplicitSpecialization,
|
|
@@ -4256,7 +4255,7 @@ Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
|
|
if (TemplateParamLists.size() > 0 && D.getCXXScopeSpec().isSet()) {
|
|
|
NewVD->setTemplateParameterListsInfo(Context,
|
|
|
TemplateParamLists.size(),
|
|
|
- TemplateParamLists.get());
|
|
|
+ TemplateParamLists.data());
|
|
|
}
|
|
|
|
|
|
if (D.getDeclSpec().isConstexprSpecified())
|
|
@@ -5169,7 +5168,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
|
|
D.getDeclSpec().getLocStart(),
|
|
|
D.getIdentifierLoc(),
|
|
|
D.getCXXScopeSpec(),
|
|
|
- TemplateParamLists.get(),
|
|
|
+ TemplateParamLists.data(),
|
|
|
TemplateParamLists.size(),
|
|
|
isFriend,
|
|
|
isExplicitSpecialization,
|
|
@@ -5208,7 +5207,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
|
|
if (TemplateParamLists.size() > 1) {
|
|
|
NewFD->setTemplateParameterListsInfo(Context,
|
|
|
TemplateParamLists.size() - 1,
|
|
|
- TemplateParamLists.get());
|
|
|
+ TemplateParamLists.data());
|
|
|
}
|
|
|
} else {
|
|
|
// This is a function template specialization.
|
|
@@ -5216,7 +5215,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
|
|
// For source fidelity, store all the template param lists.
|
|
|
NewFD->setTemplateParameterListsInfo(Context,
|
|
|
TemplateParamLists.size(),
|
|
|
- TemplateParamLists.get());
|
|
|
+ TemplateParamLists.data());
|
|
|
|
|
|
// C++0x [temp.expl.spec]p20 forbids "template<> friend void foo(int);".
|
|
|
if (isFriend) {
|
|
@@ -5248,7 +5247,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
|
|
// For source fidelity, store all the template param lists.
|
|
|
NewFD->setTemplateParameterListsInfo(Context,
|
|
|
TemplateParamLists.size(),
|
|
|
- TemplateParamLists.get());
|
|
|
+ TemplateParamLists.data());
|
|
|
}
|
|
|
|
|
|
if (Invalid) {
|
|
@@ -5522,8 +5521,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
|
|
TemplateIdAnnotation *TemplateId = D.getName().TemplateId;
|
|
|
TemplateArgs.setLAngleLoc(TemplateId->LAngleLoc);
|
|
|
TemplateArgs.setRAngleLoc(TemplateId->RAngleLoc);
|
|
|
- ASTTemplateArgsPtr TemplateArgsPtr(*this,
|
|
|
- TemplateId->getTemplateArgs(),
|
|
|
+ ASTTemplateArgsPtr TemplateArgsPtr(TemplateId->getTemplateArgs(),
|
|
|
TemplateId->NumArgs);
|
|
|
translateTemplateArguments(TemplateArgsPtr,
|
|
|
TemplateArgs);
|
|
@@ -6509,8 +6507,7 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init,
|
|
|
}
|
|
|
InitializationSequence InitSeq(*this, Entity, Kind, Args, NumArgs);
|
|
|
ExprResult Result = InitSeq.Perform(*this, Entity, Kind,
|
|
|
- MultiExprArg(*this, Args,NumArgs),
|
|
|
- &DclT);
|
|
|
+ MultiExprArg(Args, NumArgs), &DclT);
|
|
|
if (Result.isInvalid()) {
|
|
|
VDecl->setInvalidDecl();
|
|
|
return;
|
|
@@ -6897,8 +6894,7 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl,
|
|
|
= InitializationKind::CreateDefault(Var->getLocation());
|
|
|
|
|
|
InitializationSequence InitSeq(*this, Entity, Kind, 0, 0);
|
|
|
- ExprResult Init = InitSeq.Perform(*this, Entity, Kind,
|
|
|
- MultiExprArg(*this, 0, 0));
|
|
|
+ ExprResult Init = InitSeq.Perform(*this, Entity, Kind, MultiExprArg());
|
|
|
if (Init.isInvalid())
|
|
|
Var->setInvalidDecl();
|
|
|
else if (Init.get()) {
|
|
@@ -7480,8 +7476,7 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Declarator &D) {
|
|
|
Scope *ParentScope = FnBodyScope->getParent();
|
|
|
|
|
|
D.setFunctionDefinitionKind(FDK_Definition);
|
|
|
- Decl *DP = HandleDeclarator(ParentScope, D,
|
|
|
- MultiTemplateParamsArg(*this));
|
|
|
+ Decl *DP = HandleDeclarator(ParentScope, D, MultiTemplateParamsArg());
|
|
|
return ActOnStartOfFunctionDef(FnBodyScope, DP);
|
|
|
}
|
|
|
|
|
@@ -8292,7 +8287,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
|
|
|
(SS.isNotEmpty() && TUK != TUK_Reference)) {
|
|
|
if (TemplateParameterList *TemplateParams
|
|
|
= MatchTemplateParametersToScopeSpecifier(KWLoc, NameLoc, SS,
|
|
|
- TemplateParameterLists.get(),
|
|
|
+ TemplateParameterLists.data(),
|
|
|
TemplateParameterLists.size(),
|
|
|
TUK == TUK_Friend,
|
|
|
isExplicitSpecialization,
|
|
@@ -8310,7 +8305,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
|
|
|
TemplateParams, AS,
|
|
|
ModulePrivateLoc,
|
|
|
TemplateParameterLists.size()-1,
|
|
|
- TemplateParameterLists.get());
|
|
|
+ TemplateParameterLists.data());
|
|
|
return Result.get();
|
|
|
} else {
|
|
|
// The "template<>" header is extraneous.
|
|
@@ -8859,7 +8854,7 @@ CreateNewDecl:
|
|
|
if (TemplateParameterLists.size() > 0) {
|
|
|
New->setTemplateParameterListsInfo(Context,
|
|
|
TemplateParameterLists.size(),
|
|
|
- TemplateParameterLists.get());
|
|
|
+ TemplateParameterLists.data());
|
|
|
}
|
|
|
}
|
|
|
else
|