diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-17 21:22:26 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-17 21:22:26 +0000 |
commit | 7f537c18c7029e73f0bd555be3782c066e7e2c1e (patch) | |
tree | 2c820b54957e31d7fbf0658dc4b92235c0852255 /lib/Sema/SemaStmt.cpp | |
parent | 6b1d283fe879fb11d7ce7a69feecf66e77b0eaf3 (diff) |
Make ActOnWhileStmt take a FullExprArg for the condition expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 155b51048a..ebaa99fa98 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -542,13 +542,14 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtArg Switch, } Action::OwningStmtResult -Sema::ActOnWhileStmt(SourceLocation WhileLoc, ExprArg Cond, StmtArg Body) { - Expr *condExpr = Cond.takeAs<Expr>(); +Sema::ActOnWhileStmt(SourceLocation WhileLoc, FullExprArg Cond, StmtArg Body) { + ExprArg CondArg(Cond.release()); + Expr *condExpr = CondArg.takeAs<Expr>(); assert(condExpr && "ActOnWhileStmt(): missing expression"); if (!condExpr->isTypeDependent()) { DefaultFunctionArrayConversion(condExpr); - Cond = condExpr; + CondArg = condExpr; QualType condType = condExpr->getType(); if (getLangOptions().CPlusPlus) { @@ -560,7 +561,7 @@ Sema::ActOnWhileStmt(SourceLocation WhileLoc, ExprArg Cond, StmtArg Body) { << condType << condExpr->getSourceRange()); } - Cond.release(); + CondArg.release(); return Owned(new (Context) WhileStmt(condExpr, Body.takeAs<Stmt>(), WhileLoc)); } |