[C++20] [Modules] Make placement allocation functions always visible
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Mon, 9 Jan 2023 02:39:35 +0000 (10:39 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Mon, 9 Jan 2023 02:40:23 +0000 (10:40 +0800)
commitee1be282241b1253847e663af000f7082b7f03a3
tree4c16803cefd285f56811d00f6350600fbe934d22
parent33794cffcfdadfffda2c78c73a25ce6fc58596f0
[C++20] [Modules] Make placement allocation functions always visible

Close https://github.com/llvm/llvm-project/issues/59601.

This is actually a workaround for the issue. See the comments and the
test for example. The proper fix should make the placement allocation
functions acceptable based on the context. But it is harder and more
complex on the one side. On the other side, such workaround won't be too
bad in practice since users rarely call the placement allocation
functions directly.

So personally I prefer to address such problems in the simpler way.

Reviewed By: royjacobson

Differential Revision: https://reviews.llvm.org/D141023
clang/lib/Sema/SemaLookup.cpp
clang/test/Modules/placement-new-reachable.cpp [new file with mode: 0644]