[C++20] [Modules] Disable preferred_name when writing a C++20 Module interface
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Fri, 22 Jul 2022 05:20:22 +0000 (13:20 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Tue, 26 Jul 2022 15:58:07 +0000 (23:58 +0800)
commita2772fc806af7db5d58c7e3d604270a92fff79de
tree39e9c4a78be223b32a8e186b0a36235d202672ba
parent7ca9e471fe5b5ec51d151774e52dd0d5bd8f0ad0
[C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

Currently, the use of preferred_name would block implementing std
modules in libcxx. See https://github.com/llvm/llvm-project/issues/56490
for example.
The problem is pretty hard and it looks like we couldn't solve it in a
short time. So we sent this patch as a workaround to avoid blocking us
to modularize STL. This is intended to be fixed properly in the future.

Reviewed By: erichkeane, aaron.ballman, tahonermann

Differential Revision: https://reviews.llvm.org/D130331
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Serialization/ASTWriter.h
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Modules/preferred_name.cppm [new file with mode: 0644]