[PATCH] D129174: [C++20][Modules] Invalidate internal-linkage functions in overload sets [P1815R2 part 1]
Iain Sandoe via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 6 01:18:59 PDT 2022
iains created this revision.
Herald added a project: All.
iains added reviewers: urnathan, ChuanqiXu.
iains added a subscriber: clang-modules.
iains published this revision for review.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This is an implementation of the first part of P1815 <https://reviews.llvm.org/P1815> (and includes the testcase for
[basic.def.odr]/ p10).
If a function is in a different modular TU, and has internal-linkage, we invalidate its
entry in an overload set.
In [basic.lookup.argdep] p5 ex 2, we now correctly reject the use of `R::g` in the attempted
instantiation of 'apply' in TU #3.
Note that clang (and GCC) also rejects `f(x)` in the same TU, where the example currently
states it should be OK. A clarification question has been sent to core about this.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129174
Files:
clang/include/clang/Sema/Overload.h
clang/lib/Sema/SemaOverload.cpp
clang/test/CXX/basic/basic.link/p10-ex2.cpp
clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p5-ex2.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129174.442459.patch
Type: text/x-patch
Size: 4998 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220706/9bb01068/attachment.bin>
More information about the cfe-commits
mailing list