[PATCH] D125517: [Frontend] [Coroutines] Emit error when we found incompatible allocation function in promise_type
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 12 20:41:57 PDT 2022
ChuanqiXu created this revision.
ChuanqiXu added reviewers: aaron.ballman, cor3ntin, clang-language-wg.
ChuanqiXu added a project: clang.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added a subscriber: cfe-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125517
Files:
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaCoroutine.cpp
clang/test/SemaCXX/coroutine-allocs.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125517.429130.patch
Type: text/x-patch
Size: 7365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220513/78ac6a12/attachment.bin>
More information about the cfe-commits
mailing list