[clang] [clang][ASTImporter][StructuralEquivalence] improve StructuralEquivalence on recordType (PR #76226)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 08:07:02 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:

It would be better to check if `D2Spec` is null.

https://github.com/llvm/llvm-project/pull/76226


More information about the cfe-commits mailing list