4 Commits

Author SHA1 Message Date
Chuanqi Xu
c31d6b4ef1 [ODRHash] Hash type-as-written
Close https://github.com/llvm/llvm-project/issues/63947
Close https://github.com/llvm/llvm-project/issues/63595

This is suggested by @rsmith in
https://reviews.llvm.org/D154324#inline-1508868

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D156210
2023-07-31 11:05:47 +08:00
Chuanqi Xu
8a86f85ab1 Revert "[C++20] [Modules] Use CanonicalType for base classes"
Close https://github.com/llvm/llvm-project/issues/64091

This reverts commit f82df0b285acd8a7115f0bfc55ce44474251c2d1 and add a
test from https://github.com/llvm/llvm-project/issues/64091
2023-07-25 11:03:57 +08:00
Chuanqi Xu
7db501a738 [NFC] Adjust test for pr63595
The original test case is not strictly correct but our ODR checking
system doesn't find it.
2023-07-19 16:51:37 +08:00
Chuanqi Xu
f82df0b285 [C++20] [Modules] Use CanonicalType for base classes
This comes from https://reviews.llvm.org/D153003

By @rsmith, the test case is valid since:

> Per [temp.type]/1.4 (http://eel.is/c++draft/temp.type#1.4),
>
>> Two template-ids are the same if [...] their corresponding template
>> template-arguments refer to the same template.
> so B<A> and B<NS::A> are the same type. The stricter "same sequence of
> tokens" rule doesn't apply here, because using-declarations are not
> definitions.

> we should either (preferably) be including only the syntactic form of
> the base specifier (because local syntax is what the ODR covers), or
> the canonical type (which should be the same for both
> using-declarations).

Here we adopt the second suggested solutions.

Reviewed By: cor3ntin, v.g.vassilev

Differential Revision: https://reviews.llvm.org/D154324
2023-07-11 15:59:03 +08:00