aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-06 08:20:24 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-06 08:20:24 +0000
commit4765fa05b5652fcc4356371c2f481d0ea9a1b007 (patch)
tree82e9de9098859a89427f187c0a7eaae82ab788e2 /lib/Sema/SemaStmt.cpp
parentcd940a1e13e588a43973cd7ae33b5c33a3062739 (diff)
Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 7ab30d1621..e405e6bdf2 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -89,7 +89,7 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S) {
// we might want to make a more specific diagnostic. Check for one of these
// cases now.
unsigned DiagID = diag::warn_unused_expr;
- if (const CXXExprWithTemporaries *Temps = dyn_cast<CXXExprWithTemporaries>(E))
+ if (const ExprWithCleanups *Temps = dyn_cast<ExprWithCleanups>(E))
E = Temps->getSubExpr();
E = E->IgnoreParenImpCasts();
@@ -455,7 +455,7 @@ Sema::ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, Expr *Cond,
if (!CondVar) {
CheckImplicitConversions(Cond, SwitchLoc);
- CondResult = MaybeCreateCXXExprWithTemporaries(Cond);
+ CondResult = MaybeCreateExprWithCleanups(Cond);
if (CondResult.isInvalid())
return StmtError();
Cond = CondResult.take();
@@ -899,7 +899,7 @@ Sema::ActOnDoStmt(SourceLocation DoLoc, Stmt *Body,
return StmtError();
CheckImplicitConversions(Cond, DoLoc);
- ExprResult CondResult = MaybeCreateCXXExprWithTemporaries(Cond);
+ ExprResult CondResult = MaybeCreateExprWithCleanups(Cond);
if (CondResult.isInvalid())
return StmtError();
Cond = CondResult.take();
@@ -958,7 +958,7 @@ Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc,
/// full-expression.
StmtResult Sema::ActOnForEachLValueExpr(Expr *E) {
CheckImplicitConversions(E);
- ExprResult Result = MaybeCreateCXXExprWithTemporaries(E);
+ ExprResult Result = MaybeCreateExprWithCleanups(E);
if (Result.isInvalid()) return StmtError();
return Owned(static_cast<Stmt*>(Result.get()));
}
@@ -1195,7 +1195,7 @@ Sema::ActOnBlockReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
if (RetValExp) {
CheckImplicitConversions(RetValExp, ReturnLoc);
- RetValExp = MaybeCreateCXXExprWithTemporaries(RetValExp);
+ RetValExp = MaybeCreateExprWithCleanups(RetValExp);
}
RetValExp = Res.takeAs<Expr>();
@@ -1254,7 +1254,7 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
}
CheckImplicitConversions(RetValExp, ReturnLoc);
- RetValExp = MaybeCreateCXXExprWithTemporaries(RetValExp);
+ RetValExp = MaybeCreateExprWithCleanups(RetValExp);
}
Result = new (Context) ReturnStmt(ReturnLoc, RetValExp, 0);
@@ -1298,7 +1298,7 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
if (RetValExp) {
CheckImplicitConversions(RetValExp, ReturnLoc);
- RetValExp = MaybeCreateCXXExprWithTemporaries(RetValExp);
+ RetValExp = MaybeCreateExprWithCleanups(RetValExp);
}
Result = new (Context) ReturnStmt(ReturnLoc, RetValExp, NRVOCandidate);
}