diff options
author | Tim Shen <timshen91@gmail.com> | 2016-06-09 21:13:39 +0000 |
---|---|---|
committer | Tim Shen <timshen91@gmail.com> | 2016-06-09 21:13:39 +0000 |
commit | 17b3deeff3f0b246789c37911a445dbd4ad3456f (patch) | |
tree | e03729ec0980541f07ba560ef329fb47b3443254 /clang/lib/Sema/SemaCoroutine.cpp | |
parent | ee2ce4a50e16548cd4274e8532491cc8b06d7a8d (diff) | |
download | bcm5719-llvm-17b3deeff3f0b246789c37911a445dbd4ad3456f.tar.gz bcm5719-llvm-17b3deeff3f0b246789c37911a445dbd4ad3456f.zip |
Revert "[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr."
This reverts r272296, since there are clang-tidy failures that appear to
be caused by this change.
llvm-svn: 272310
Diffstat (limited to 'clang/lib/Sema/SemaCoroutine.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCoroutine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp index c8715fff415..4b4fd6b16a0 100644 --- a/clang/lib/Sema/SemaCoroutine.cpp +++ b/clang/lib/Sema/SemaCoroutine.cpp @@ -244,7 +244,7 @@ ExprResult Sema::BuildCoawaitExpr(SourceLocation Loc, Expr *E) { // If the expression is a temporary, materialize it as an lvalue so that we // can use it multiple times. if (E->getValueKind() == VK_RValue) - E = CreateMaterializeTemporaryExpr(E->getType(), E, true); + E = new (Context) MaterializeTemporaryExpr(E->getType(), E, true); // Build the await_ready, await_suspend, await_resume calls. ReadySuspendResumeResult RSS = buildCoawaitCalls(*this, Loc, E); @@ -311,7 +311,7 @@ ExprResult Sema::BuildCoyieldExpr(SourceLocation Loc, Expr *E) { // If the expression is a temporary, materialize it as an lvalue so that we // can use it multiple times. if (E->getValueKind() == VK_RValue) - E = CreateMaterializeTemporaryExpr(E->getType(), E, true); + E = new (Context) MaterializeTemporaryExpr(E->getType(), E, true); // Build the await_ready, await_suspend, await_resume calls. ReadySuspendResumeResult RSS = buildCoawaitCalls(*this, Loc, E); |