[all-commits] [llvm/llvm-project] 452fac: [Frontend] [Coroutines] Emit error when we found i...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Mon May 16 19:37:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 452fac9534c00290e92819202d445810e33d0444
      https://github.com/llvm/llvm-project/commit/452fac9534c00290e92819202d445810e33d0444
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2022-05-17 (Tue, 17 May 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaCoroutine.cpp
    A clang/test/SemaCXX/coroutine-allocs.cpp

  Log Message:
  -----------
  [Frontend] [Coroutines] Emit error when we found incompatible allocation
function in promise_type

According to https://cplusplus.github.io/CWG/issues/2585.html, this
fixes https://github.com/llvm/llvm-project/issues/54881

Simply, the clang tried to found (do lookup and overload resolution. Is
there any better word to use than found?) allocation function in
promise_type and global scope. However, this is not consistent with the
standard. The standard behavior would be that the compiler shouldn't
lookup in global scope in case we lookup the allocation function name in
promise_type. In other words, the program is ill-formed if there is
incompatible allocation function in promise type.

Reviewed By: erichkeane

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




More information about the All-commits mailing list