diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-04-03 19:21:00 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-04-03 19:21:00 +0000 |
commit | bee782bb9212180689062b28d578981516655498 (patch) | |
tree | 9d73081b74a67048ea134a0b83a053aad7a6c16d /clang/lib/AST/StmtCXX.cpp | |
parent | dee5565869e00ef1fa62ea25c2f04c7d54b9e9fd (diff) | |
download | llvm-bee782bb9212180689062b28d578981516655498.zip llvm-bee782bb9212180689062b28d578981516655498.tar.gz llvm-bee782bb9212180689062b28d578981516655498.tar.bz2 |
[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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtCXX.cpp b/clang/lib/AST/StmtCXX.cpp index 01dad63..aade13e 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 +} |