@@ -1059,8 +1059,8 @@ auto ASTRewriter::operator()(InitDeclaratorAST* ast, const DeclSpecs& declSpecs)
10591059
10601060 auto decl = Decl{declSpecs, copy->declarator };
10611061
1062- auto type = getDeclaratorType ( translationUnit (), copy-> declarator ,
1063- declSpecs.getType ());
1062+ auto type =
1063+ getDeclaratorType ( translationUnit (), copy-> declarator , declSpecs.type ());
10641064
10651065 // ### fix scope
10661066 if (binder_.scope () && binder_.scope ()->isClassScope ()) {
@@ -1152,12 +1152,13 @@ auto ASTRewriter::operator()(TypeIdAST* ast) -> TypeIdAST* {
11521152 typeSpecifierList = &(*typeSpecifierList)->next ;
11531153 typeSpecifierListCtx.accept (value);
11541154 }
1155+ typeSpecifierListCtx.finish ();
11551156
11561157 copy->declarator = operator ()(ast->declarator );
11571158
11581159 auto declaratorDecl = Decl{typeSpecifierListCtx, copy->declarator };
11591160 auto declaratorType = getDeclaratorType (translationUnit (), copy->declarator ,
1160- typeSpecifierListCtx.getType ());
1161+ typeSpecifierListCtx.type ());
11611162 copy->type = declaratorType;
11621163
11631164 return copy;
@@ -1194,8 +1195,10 @@ auto ASTRewriter::operator()(BaseSpecifierAST* ast) -> BaseSpecifierAST* {
11941195 copy->nestedNameSpecifier = operator ()(ast->nestedNameSpecifier );
11951196 copy->templateLoc = ast->templateLoc ;
11961197 copy->unqualifiedId = operator ()(ast->unqualifiedId );
1198+ copy->ellipsisLoc = ast->ellipsisLoc ;
11971199 copy->isTemplateIntroduced = ast->isTemplateIntroduced ;
11981200 copy->isVirtual = ast->isVirtual ;
1201+ copy->isVariadic = ast->isVariadic ;
11991202 copy->accessSpecifier = ast->accessSpecifier ;
12001203 copy->symbol = ast->symbol ;
12011204
@@ -1403,6 +1406,7 @@ auto ASTRewriter::DeclarationVisitor::operator()(SimpleDeclarationAST* ast)
14031406 declSpecifierList = &(*declSpecifierList)->next ;
14041407 declSpecifierListCtx.accept (value);
14051408 }
1409+ declSpecifierListCtx.finish ();
14061410
14071411 for (auto initDeclaratorList = ©->initDeclaratorList ;
14081412 auto node : ListView{ast->initDeclaratorList }) {
@@ -1614,6 +1618,7 @@ auto ASTRewriter::DeclarationVisitor::operator()(OpaqueEnumDeclarationAST* ast)
16141618 typeSpecifierList = &(*typeSpecifierList)->next ;
16151619 typeSpecifierListCtx.accept (value);
16161620 }
1621+ typeSpecifierListCtx.finish ();
16171622
16181623 copy->emicolonLoc = ast->emicolonLoc ;
16191624
@@ -1639,12 +1644,13 @@ auto ASTRewriter::DeclarationVisitor::operator()(FunctionDefinitionAST* ast)
16391644 declSpecifierList = &(*declSpecifierList)->next ;
16401645 declSpecifierListCtx.accept (value);
16411646 }
1647+ declSpecifierListCtx.finish ();
16421648
16431649 copy->declarator = rewrite (ast->declarator );
16441650
16451651 auto declaratorDecl = Decl{declSpecifierListCtx, copy->declarator };
16461652 auto declaratorType = getDeclaratorType (translationUnit (), copy->declarator ,
1647- declSpecifierListCtx.getType ());
1653+ declSpecifierListCtx.type ());
16481654 copy->requiresClause = rewrite (ast->requiresClause );
16491655 copy->functionBody = rewrite (ast->functionBody );
16501656 copy->symbol = ast->symbol ;
@@ -1878,12 +1884,13 @@ auto ASTRewriter::DeclarationVisitor::operator()(ParameterDeclarationAST* ast)
18781884 typeSpecifierList = &(*typeSpecifierList)->next ;
18791885 typeSpecifierListCtx.accept (value);
18801886 }
1887+ typeSpecifierListCtx.finish ();
18811888
18821889 copy->declarator = rewrite (ast->declarator );
18831890
18841891 auto declaratorDecl = Decl{typeSpecifierListCtx, copy->declarator };
18851892 auto declaratorType = getDeclaratorType (translationUnit (), copy->declarator ,
1886- typeSpecifierListCtx.getType ());
1893+ typeSpecifierListCtx.type ());
18871894 copy->type = declaratorType;
18881895 copy->equalLoc = ast->equalLoc ;
18891896 copy->expression = rewrite (ast->expression );
@@ -1931,6 +1938,7 @@ auto ASTRewriter::DeclarationVisitor::operator()(
19311938 declSpecifierList = &(*declSpecifierList)->next ;
19321939 declSpecifierListCtx.accept (value);
19331940 }
1941+ declSpecifierListCtx.finish ();
19341942
19351943 copy->refQualifierLoc = ast->refQualifierLoc ;
19361944 copy->lbracketLoc = ast->lbracketLoc ;
@@ -3034,12 +3042,13 @@ auto ASTRewriter::ExpressionVisitor::operator()(NewExpressionAST* ast)
30343042 typeSpecifierList = &(*typeSpecifierList)->next ;
30353043 typeSpecifierListCtx.accept (value);
30363044 }
3045+ typeSpecifierListCtx.finish ();
30373046
30383047 copy->declarator = rewrite (ast->declarator );
30393048
30403049 auto declaratorDecl = Decl{typeSpecifierListCtx, copy->declarator };
30413050 auto declaratorType = getDeclaratorType (translationUnit (), copy->declarator ,
3042- typeSpecifierListCtx.getType ());
3051+ typeSpecifierListCtx.type ());
30433052 copy->rparenLoc = ast->rparenLoc ;
30443053 copy->newInitalizer = rewrite (ast->newInitalizer );
30453054
@@ -3224,12 +3233,13 @@ auto ASTRewriter::ExpressionVisitor::operator()(ConditionExpressionAST* ast)
32243233 declSpecifierList = &(*declSpecifierList)->next ;
32253234 declSpecifierListCtx.accept (value);
32263235 }
3236+ declSpecifierListCtx.finish ();
32273237
32283238 copy->declarator = rewrite (ast->declarator );
32293239
32303240 auto declaratorDecl = Decl{declSpecifierListCtx, copy->declarator };
32313241 auto declaratorType = getDeclaratorType (translationUnit (), copy->declarator ,
3232- declSpecifierListCtx.getType ());
3242+ declSpecifierListCtx.type ());
32333243 copy->initializer = rewrite (ast->initializer );
32343244 copy->symbol = ast->symbol ;
32353245
@@ -3734,6 +3744,7 @@ auto ASTRewriter::SpecifierVisitor::operator()(EnumSpecifierAST* ast)
37343744 typeSpecifierList = &(*typeSpecifierList)->next ;
37353745 typeSpecifierListCtx.accept (value);
37363746 }
3747+ typeSpecifierListCtx.finish ();
37373748
37383749 copy->lbraceLoc = ast->lbraceLoc ;
37393750
@@ -4498,12 +4509,13 @@ auto ASTRewriter::ExceptionDeclarationVisitor::operator()(
44984509 typeSpecifierList = &(*typeSpecifierList)->next ;
44994510 typeSpecifierListCtx.accept (value);
45004511 }
4512+ typeSpecifierListCtx.finish ();
45014513
45024514 copy->declarator = rewrite (ast->declarator );
45034515
45044516 auto declaratorDecl = Decl{typeSpecifierListCtx, copy->declarator };
45054517 auto declaratorType = getDeclaratorType (translationUnit (), copy->declarator ,
4506- typeSpecifierListCtx.getType ());
4518+ typeSpecifierListCtx.type ());
45074519
45084520 return copy;
45094521}
0 commit comments