================
@@ -3397,7 +3397,8 @@ void Sema::DeclareGlobalNewDelete() {
   GlobalNewDeleteDeclared = true;
 
   QualType VoidPtr = Context.getPointerType(Context.VoidTy);
-  QualType SizeT = Context.getSizeType();
+  // FIXME: Why is 'Canonical'SizeType needed here?
+  QualType SizeT = Context.getCanonicalSizeType();
----------------
mizvekov wrote:

Ah, if you look at this line in the definition `DeclareGlobalAllocationFunction`
```C++
if (llvm::ArrayRef(FuncParams) == Params) {
```

This is only canonicalizing the parameters for the existing declaration, if you 
make this change, you also need to change this part so it compares canonical 
types for both sides.

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