diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-05-25 02:16:53 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-05-25 02:16:53 +0000 |
commit | da8f9b5b1b76289e16653d39583ca86f8f3f742e (patch) | |
tree | b0e71b6e3036a5ed3a54e00bc775323343923552 /libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach | |
parent | 1754fee8646c69fd388dabcbde390a860317297e (diff) | |
download | bcm5719-llvm-da8f9b5b1b76289e16653d39583ca86f8f3f742e.tar.gz bcm5719-llvm-da8f9b5b1b76289e16653d39583ca86f8f3f742e.zip |
[coroutines] Fix fallthrough diagnostics for coroutines
Summary:
This patch fixes a number of issues with the analysis warnings emitted when a coroutine may reach the end of the function w/o returning.
* Fix bug where coroutines with `return_value` are incorrectly diagnosed as missing `co_return`'s.
* Rework diagnostic message to no longer say "non-void coroutine", because that implies the coroutine doesn't have a void return type, which it might. In this case a non-void coroutine is one who's promise type does not contain `return_void()`
As a side-effect of this patch, coroutine bodies that contain an invalid coroutine promise objects are marked as invalid.
Reviewers: GorNishanov, rsmith, aaron.ballman, majnemer
Reviewed By: GorNishanov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D33532
llvm-svn: 303831
Diffstat (limited to 'libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach')
0 files changed, 0 insertions, 0 deletions