HomePhabricator

[Coroutines] Warning if return type of coroutine_handle::address is not void*

Authored by ChuanqiXu on Jul 5 2020, 10:39 PM.

Description

[Coroutines] Warning if return type of coroutine_handle::address is not void*

User can own a version of coroutine_handle::address() whose return type is not
void* by using template specialization for coroutine_handle<> for some
promise_type.

In this case, the codes may violate the capability with existing async C APIs
that accepted a void* data parameter which was then passed back to the
user-provided callback.

Patch by ChuanqiXu

Differential Revision: https://reviews.llvm.org/D82442