C2::StmtResult C2Sema::ActOnDoStmt(SourceLocation loc, ExprResult Cond, StmtResult Then) { #ifdef SEMA_DEBUG std::cerr << COL_SEMA"SEMA: do statement at "; loc.dump(SourceMgr); std::cerr << ANSI_NORMAL"\n"; #endif return StmtResult(new DoStmt(loc, Cond.release(), Then.release())); }
C2::StmtResult C2Sema::ActOnIfStmt(SourceLocation ifLoc, ExprResult condition, StmtResult thenStmt, SourceLocation elseLoc, StmtResult elseStmt) { #ifdef SEMA_DEBUG std::cerr << COL_SEMA"SEMA: if statement at "; ifLoc.dump(SourceMgr); std::cerr << ANSI_NORMAL"\n"; #endif return StmtResult(new IfStmt(ifLoc, condition.release(), thenStmt.release(), elseLoc, elseStmt.release())); }