[all-commits] [llvm/llvm-project] f82df0: [C++20] [Modules] Use CanonicalType for base classes
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Tue Jul 11 00:59:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f82df0b285acd8a7115f0bfc55ce44474251c2d1
https://github.com/llvm/llvm-project/commit/f82df0b285acd8a7115f0bfc55ce44474251c2d1
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2023-07-11 (Tue, 11 Jul 2023)
Changed paths:
M clang/lib/AST/ODRHash.cpp
A clang/test/Modules/pr63595.cppm
Log Message:
-----------
[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
More information about the All-commits
mailing list