================
@@ -1480,6 +1480,16 @@ static bool 
IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
       return false;
     break;
   }
+  case Type::PredefinedSugar: {
+    const auto *TP1 = cast<PredefinedSugarType>(T1);
+    const auto *TP2 = cast<PredefinedSugarType>(T2);
+    if (TP1->getKind() != TP2->getKind())
+      return false;
+    else
+      assert(TP1->getCanonicalTypeInternal() ==
+             TP2->getCanonicalTypeInternal());
----------------
mizvekov wrote:

```suggestion
```
We can't directly compare pointers like that here, as this structural 
equivalence library is used to compare nodes from different ASTContexts, and 
the pointers being different doesn't mean anything in that case.

https://github.com/llvm/llvm-project/pull/143653
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to