[all-commits] [llvm/llvm-project] 884983: [Coroutines] Warning if return type of coroutine_h...

junparser via All-commits all-commits at lists.llvm.org
Sun Jul 5 22:47:05 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8849831d55a203eca1069a0e11877ab7e7e0ac57
      https://github.com/llvm/llvm-project/commit/8849831d55a203eca1069a0e11877ab7e7e0ac57
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2020-07-06 (Mon, 06 Jul 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/Sema/SemaCoroutine.cpp
    A clang/test/SemaCXX/coroutine_handle-addres-return-type.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list