[PATCH] D33534: [coroutines] Diagnose when promise types fail to declare either return_void or return_value.
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 24 20:47:40 PDT 2017
EricWF created this revision.
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.
https://reviews.llvm.org/D33534
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaCoroutine.cpp
test/SemaCXX/coreturn.cpp
test/SemaCXX/coroutines.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33534.100200.patch
Type: text/x-patch
Size: 12175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170525/f836c2d9/attachment.bin>
More information about the cfe-commits
mailing list