[libcxx-commits] [clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)
Matheus Izvekov via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 4 16:24:52 PDT 2025
================
@@ -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
More information about the libcxx-commits
mailing list