[C++20][Modules] Update ADL to handle basic.lookup.argdep p4 [P1815R2 part 1]
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 6 Jul 2022 06:40:01 +0000 (07:40 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Mon, 25 Jul 2022 13:28:59 +0000 (14:28 +0100)
commit25558a1bfd79e03bed74873ab83ccfc3650fb64f
tree8ff574d21979d14845f91b655b6719f506289c57
parent59179d72b2e3d3b99ebc342374c9c797d526ac5d
[C++20][Modules] Update ADL to handle basic.lookup.argdep p4 [P1815R2 part 1]

This includes the revised provisions of [basic.lookup.argdep] p4

1. ADL is amended to handle p 4.3 where functions in trasitively imported modules may
become visible when they are exported in the same namespace as a visible type.

2. If a function is in a different modular TU, and has internal-linkage, we invalidate
its entry in an overload set.

[basic.lookup.argdep] p5 ex 2 now passes.

Differential Revision: https://reviews.llvm.org/D129174
clang/include/clang/Sema/Overload.h
clang/lib/Sema/SemaLookup.cpp
clang/lib/Sema/SemaOverload.cpp
clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p5-ex2.cpp [new file with mode: 0644]