[C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 8 Dec 2021 06:58:44 +0000 (14:58 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 8 Dec 2021 07:00:04 +0000 (15:00 +0800)
commite166755a691921612274fdad945d3a6b05d00439
treec0737ed4821f6b08451f5ecfe2b66e4048dc7558
parentb1c369e01fa618c1f5e6b31640d5ab966c4a31a2
[C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization

The compiler would judge two concepts is same by their addresses.
However, when we use modules, the addresses wouldn't be the same all the
time since one is parsed in their TU and another is imported in another
TU.
This patch fixes this by using isSameEntity to judge the two concepts.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D114769
clang/lib/Serialization/ASTReaderDecl.cpp
clang/test/Modules/Inputs/concept/A.cppm [new file with mode: 0644]
clang/test/Modules/Inputs/concept/foo.h [new file with mode: 0644]
clang/test/Modules/concept.cppm [new file with mode: 0644]