# HG changeset patch # User Shinji KONO # Date 1622816527 -32400 # Node ID d6e4c9eda2cc88eae829cd0225758bd59cdfa20e # Parent a96fbbdf2d0fbf95bb1f2f3362ad85813cad4743 ...ZZ diff -r a96fbbdf2d0f -r d6e4c9eda2cc clang/lib/Parse/ParseCbC.cpp --- a/clang/lib/Parse/ParseCbC.cpp Fri Jun 04 21:07:06 2021 +0900 +++ b/clang/lib/Parse/ParseCbC.cpp Fri Jun 04 23:22:07 2021 +0900 @@ -240,12 +240,17 @@ if (innerRes.isUsable()) CompoundStmts.push_back(innerRes.get()); + ConsumeAnyToken(); // eat the '__environment'. + Token TokSave = Tok; + SourceLocation PLocSave = PrevTokLocation; // jmp_buf env_buf; --> int env_buf[64]; Tok = PP.ReadFromString("int env_buf[64];",Loc); ConsumeAnyToken(); // innerRes = CreateDeclStmt(bufII, false, false, 64, DeclSpec::TST_typename, CreateIdentifierInfo("int", Loc)); StmtVector Stmts; innerRes = ParseStatementOrDeclaration(Stmts,( ParsedStmtContext::Compound | ParsedStmtContext::AllowDeclarationsInC)); + Tok = TokSave ; + PrevTokLocation= PLocSave ; if (innerRes.isUsable()) CompoundStmts.push_back(innerRes.get()); @@ -270,7 +275,6 @@ CompoundStmts.push_back(innerRes.get()); StmtResult CompoundStmtRes = Actions.ActOnCompoundStmt(Loc,Loc,CompoundStmts,true); - ConsumeAnyToken(); // eat the '__environment'. Result = Actions.ActOnStmtExpr(getCurScope() ,Loc, CompoundStmtRes.get(), Loc); // cast