diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-05-25 14:59:39 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-05-25 14:59:39 +0000 |
commit | fc50f62caafd35b3dd4297d7af109fb7e6c00675 (patch) | |
tree | b8f0eb8222ca57760c1363746a34757d601fcbdb /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 4bf928282f0d4d3b4af92ba9e404a770d653c2df (diff) | |
download | llvm-fc50f62caafd35b3dd4297d7af109fb7e6c00675.zip llvm-fc50f62caafd35b3dd4297d7af109fb7e6c00675.tar.gz llvm-fc50f62caafd35b3dd4297d7af109fb7e6c00675.tar.bz2 |
[coroutines] Diagnose when promise types fail to declare either return_void or return_value.
Summary:
According to the PDTS it's perfectly legal to have a promise type that defines neither `return_value` nor `return_void`. However a coroutine that uses such a promise type will almost always have UB, because it can never `co_return`.
This patch changes Clang to diagnose such cases as an error. It also cleans up some of the diagnostic messages relating to member lookup in the promise type.
Reviewers: GorNishanov, rsmith
Reviewed By: GorNishanov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D33534
llvm-svn: 303868
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions