[clang] [clang][ASTImporter][StructuralEquivalence] improve StructuralEquivalence on recordType (PR #76226)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 3 01:12:41 PST 2024
================
@@ -1491,6 +1492,12 @@ static bool IsRecordContextStructurallyEquivalent(RecordDecl *D1,
return false;
}
+ if (auto *D1Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC1)) {
+ auto *D2Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC2);
----------------
balazske wrote:
I see now that the old code was better, there is a previous check `DC1->getDeclKind() != DC2->getDeclKind()`, this should ensure that the type is the same.
https://github.com/llvm/llvm-project/pull/76226
More information about the cfe-commits
mailing list