summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtCXX.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-04-03 19:21:00 +0000
committerEric Fiselier <eric@efcs.ca>2017-04-03 19:21:00 +0000
commitbee782bb9212180689062b28d578981516655498 (patch)
tree9d73081b74a67048ea134a0b83a053aad7a6c16d /clang/lib/AST/StmtCXX.cpp
parentdee5565869e00ef1fa62ea25c2f04c7d54b9e9fd (diff)
[coroutines] Fix rebuilding of implicit and dependent coroutine statements.
Summary: Certain implicitly generated coroutine statements, such as the calls to 'return_value()' or `return_void()` or `get_return_object_on_allocation_failure()`, cannot be built until the promise type is no longer dependent. This means they are not built until after the coroutine body statement has been transformed. This patch fixes an issue where these statements would never be built for coroutine templates. It also fixes a small issue where diagnostics about `get_return_object_on_allocation_failure()` were incorrectly suppressed. Reviewers: rsmith, majnemer, GorNishanov, aaron.ballman Reviewed By: GorNishanov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31487 llvm-svn: 299380
Diffstat (limited to 'clang/lib/AST/StmtCXX.cpp')
-rw-r--r--clang/lib/AST/StmtCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtCXX.cpp b/clang/lib/AST/StmtCXX.cpp
index 01dad6391824..aade13ed3bd4 100644
--- a/clang/lib/AST/StmtCXX.cpp
+++ b/clang/lib/AST/StmtCXX.cpp
@@ -112,4 +112,4 @@ CoroutineBodyStmt::CoroutineBodyStmt(CoroutineBodyStmt::CtorArgs const &Args)
Args.ReturnStmtOnAllocFailure;
std::copy(Args.ParamMoves.begin(), Args.ParamMoves.end(),
const_cast<Stmt **>(getParamMoves().data()));
-} \ No newline at end of file
+}