implement ast nodes for while and do loops
llvm-svn: 39116
diff --git a/clang/Sema/Sema.cpp b/clang/Sema/Sema.cpp
index 78d3725..56eb4d1 100644
--- a/clang/Sema/Sema.cpp
+++ b/clang/Sema/Sema.cpp
@@ -114,6 +114,17 @@
}
Action::StmtResult
+ASTBuilder::ParseWhileStmt(SourceLocation WhileLoc, ExprTy *Cond, StmtTy *Body){
+ return new WhileStmt((Expr*)Cond, (Stmt*)Body);
+}
+
+Action::StmtResult
+ASTBuilder::ParseDoStmt(SourceLocation DoLoc, StmtTy *Body,
+ SourceLocation WhileLoc, ExprTy *Cond) {
+ return new DoStmt((Stmt*)Body, (Expr*)Cond);
+}
+
+Action::StmtResult
ASTBuilder::ParseReturnStmt(SourceLocation ReturnLoc,
ExprTy *RetValExp) {
return new ReturnStmt((Expr*)RetValExp);