Mercurial > hg > CbC > CbC_llvm
diff tools/clang/lib/Parse/ParseCbC.cpp @ 138:53f12981605a
Fix goto is environment
author | anatofuz |
---|---|
date | Wed, 07 Mar 2018 18:36:33 +0900 |
parents | 6cd7e602c98b |
children |
line wrap: on
line diff
--- a/tools/clang/lib/Parse/ParseCbC.cpp Tue Mar 06 08:58:23 2018 +0900 +++ b/tools/clang/lib/Parse/ParseCbC.cpp Wed Mar 07 18:36:33 2018 +0900 @@ -421,7 +421,6 @@ return New; } - /// CreateSjForContinuationWithEnv - Create statements of setjmp for continuation with the environment. /// code example: /// if (setjmp(__CbC_environment.env)){ @@ -444,7 +443,8 @@ ArgExprs.push_back(__envExprRes.get()); CondExp = Actions.ActOnCallExpr(getCurScope(), CondExp.get(), Loc, ArgExprs, Loc, 0); - CondExp = Actions.CheckBooleanCondition(Loc, CondExp.get()); + Cond = Actions.ActOnCondition(getCurScope(), Loc, CondExp.get(), Sema::ConditionKind::Boolean); + ParseScope InnerScope(this, Scope::DeclScope,false); SourceLocation InnerStatementTrailingElseLoc; @@ -464,8 +464,7 @@ InnerScope.Exit(); IfScope.Exit(); StmtResult ElseStmt; - bool IsConstexpr = false; - IfRes = Actions.ActOnIfStmt(Loc, IsConstexpr, InitStmt.get(), Cond, ThenStmt.get(),Loc, ElseStmt.get()); + IfRes = Actions.ActOnIfStmt(Loc, false, CondExp.get(), Cond, ThenStmt.get(),Loc, ElseStmt.get()); return IfRes; }