Skip to content

Commit 4943cef

Browse files
committed
please bootstrap compilers
1 parent 3a3a334 commit 4943cef

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

compiler/src/dmd/cparse.d

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ final class CParser(AST) : Parser!AST
379379
cparseDeclaration(LVL.local);
380380
if (symbols.length > 1)
381381
{
382-
auto as = AST.Statements();
382+
AST.Statements as;
383383
as.reserve(symbols.length);
384384
foreach (d; (*symbols)[])
385385
{
@@ -421,7 +421,7 @@ final class CParser(AST) : Parser!AST
421421
* statement
422422
*/
423423
nextToken();
424-
auto statements = AST.Statements();
424+
AST.Statements statements;
425425
while (token.value != TOK.rightCurly && token.value != TOK.endOfFile)
426426
{
427427
statements.push(cparseStatement(ParseStatementFlags.curlyScope));
@@ -570,7 +570,7 @@ final class CParser(AST) : Parser!AST
570570

571571
if (flags & ParseStatementFlags.curlyScope)
572572
{
573-
auto statements = AST.Statements();
573+
AST.Statements statements;
574574
while (token.value != TOK.case_ && token.value != TOK.default_ && token.value != TOK.endOfFile && token.value != TOK.rightCurly)
575575
{
576576
auto cur = cparseStatement(ParseStatementFlags.curlyScope);
@@ -605,7 +605,7 @@ final class CParser(AST) : Parser!AST
605605

606606
if (flags & ParseStatementFlags.curlyScope)
607607
{
608-
auto statements = AST.Statements();
608+
AST.Statements statements;
609609
while (token.value != TOK.case_ && token.value != TOK.default_ && token.value != TOK.endOfFile && token.value != TOK.rightCurly)
610610
{
611611
statements.push(cparseStatement(ParseStatementFlags.curlyScope));
@@ -2257,7 +2257,7 @@ final class CParser(AST) : Parser!AST
22572257
auto fd = new AST.FuncDeclaration(id.loc, prevloc, id.name, stc, ft, specifier.noreturn);
22582258
specifiersToFuncDeclaration(fd, specifier);
22592259

2260-
auto stmts = AST.Statements();
2260+
AST.Statements stmts;
22612261

22622262
if (addFuncName)
22632263
stmts.push(createFuncName(locFunc, id.name, Id.__func__));
@@ -3570,7 +3570,7 @@ final class CParser(AST) : Parser!AST
35703570
error("string literal expected for Assembler Template, not `%s`", token.toChars());
35713571
Token* toklist = null;
35723572
Token** ptoklist = &toklist;
3573-
auto statements = AST.Statements();
3573+
AST.Statements statements;
35743574

35753575
int parens;
35763576
while (1)

compiler/src/dmd/parse.d

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6167,7 +6167,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
61676167
AST.Dsymbols* a = parseDeclarations(false, null, null);
61686168
if (a.length > 1)
61696169
{
6170-
auto as = AST.Statements();
6170+
AST.Statements as;
61716171
as.reserve(a.length);
61726172
foreach (i; 0 .. a.length)
61736173
{
@@ -6256,7 +6256,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
62566256
nextToken();
62576257
//if (token.value == TOK.semicolon)
62586258
// error("use `{ }` for an empty statement, not `;`");
6259-
auto statements = AST.Statements();
6259+
AST.Statements statements;
62606260
while (token.value != TOK.rightCurly && token.value != TOK.endOfFile)
62616261
{
62626262
statements.push(parseStatement(ParseStatementFlags.curlyScope | ParseStatementFlags.semiOk));
@@ -6559,7 +6559,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
65596559

65606560
if (flags & ParseStatementFlags.curlyScope)
65616561
{
6562-
auto statements = AST.Statements();
6562+
AST.Statements statements;
65636563
while (token.value != TOK.case_ && token.value != TOK.default_ && token.value != TOK.endOfFile && token.value != TOK.rightCurly)
65646564
{
65656565
auto cur = parseStatement(ParseStatementFlags.curlyScope);
@@ -6603,7 +6603,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
66036603

66046604
if (flags & ParseStatementFlags.curlyScope)
66056605
{
6606-
auto statements = AST.Statements();
6606+
AST.Statements statements;
66076607
while (token.value != TOK.case_ && token.value != TOK.default_ && token.value != TOK.endOfFile && token.value != TOK.rightCurly)
66086608
{
66096609
statements.push(parseStatement(ParseStatementFlags.curlyScope));
@@ -7175,7 +7175,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
71757175
Token* toklist = null;
71767176
Token** ptoklist = &toklist;
71777177
Identifier label = null;
7178-
auto statements = AST.Statements();
7178+
AST.Statements statements;
71797179
size_t nestlevel = 0;
71807180
while (1)
71817181
{

compiler/src/dmd/statement.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ extern (C++) class CompoundStatement : Statement
559559
*/
560560
extern (C++) final class CompoundDeclarationStatement : CompoundStatement
561561
{
562-
extern (D) this(Loc loc, ref Statements statements) @safe
562+
extern (D) this(Loc loc, ref Statements statements) @safe nothrow
563563
{
564564
super(loc, statements, STMT.CompoundDeclaration);
565565
}
@@ -1860,7 +1860,7 @@ extern (C++) final class CompoundAsmStatement : CompoundStatement
18601860
{
18611861
STC stc; // postfix attributes like nothrow/pure/@trusted
18621862

1863-
extern (D) this(Loc loc, ref Statements statements, STC stc) @safe
1863+
extern (D) this(Loc loc, ref Statements statements, STC stc) @safe nothrow
18641864
{
18651865
super(loc, statements, STMT.CompoundAsm);
18661866
this.stc = stc;

0 commit comments

Comments
 (0)