Skip to content
Commit f82df0b2 authored by Chuanqi Xu's avatar Chuanqi Xu
Browse files

[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
parent 2ccb2dbc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment