Files
clang-p2996/clang/test/Modules/Inputs/concept/foo.h
Chuanqi Xu e166755a69 [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
2021-12-08 15:00:04 +08:00

14 lines
171 B
C++

#ifndef FOO_H
#define FOO_H
template <class T>
concept Range = requires(T &t) { t.begin(); };
struct A {
public:
template <Range T>
using range_type = T;
};
#endif