This is an archive of the discontinued LLVM Phabricator instance.

[coroutines] Diagnose when promise types fail to declare either return_void or return_value.
ClosedPublic

Authored by EricWF on May 24 2017, 8:47 PM.

Details

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.

Diff Detail

Event Timeline

EricWF created this revision.May 24 2017, 8:47 PM
This revision is now accepted and ready to land.May 25 2017, 5:23 AM
EricWF closed this revision.May 25 2017, 7:59 AM