]> granicus.if.org Git - clang/commit
[coroutines] Fix rebuilding of implicit and dependent coroutine statements.
authorEric Fiselier <eric@efcs.ca>
Mon, 17 Apr 2017 22:06:13 +0000 (22:06 +0000)
committerEric Fiselier <eric@efcs.ca>
Mon, 17 Apr 2017 22:06:13 +0000 (22:06 +0000)
commit1772bdb2438378c9da3ce2eff55c81f1804d6df1
tree898a567fe905a7802f12f2d3ea0d721dbe936e64
parent71f194f12dc686d5a39e9f94cdfbae8984eadbae
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300504 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaCoroutine.cpp
test/CodeGenCoroutines/coro-alloc.cpp
test/SemaCXX/coroutines.cpp