diff --git a/clang/lib/AST/ODRHash.cpp b/clang/lib/AST/ODRHash.cpp --- a/clang/lib/AST/ODRHash.cpp +++ b/clang/lib/AST/ODRHash.cpp @@ -593,7 +593,7 @@ ID.AddInteger(Record->getNumBases()); auto Bases = Record->bases(); for (const auto &Base : Bases) { - AddQualType(Base.getType()); + AddQualType(Base.getType().getCanonicalType()); ID.AddInteger(Base.isVirtual()); ID.AddInteger(Base.getAccessSpecifierAsWritten()); } diff --git a/clang/test/Modules/pr63595.cppm b/clang/test/Modules/pr63595.cppm new file mode 100644 --- /dev/null +++ b/clang/test/Modules/pr63595.cppm @@ -0,0 +1,44 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 -emit-module-interface -I%t %t/module1.cppm -o %t/module1.pcm +// RUN: %clang_cc1 -std=c++20 -emit-module-interface -I%t %t/module2.cppm -o %t/module2.pcm +// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/merge.cpp -verify -fsyntax-only + +//--- header.h +namespace NS { +template +class A { +}; + +template