[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 20:27:35 PDT 2025


================
@@ -3455,9 +3454,12 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
       if (Func->getNumParams() == Params.size()) {
         llvm::SmallVector<QualType, 3> FuncParams;
         for (auto *P : Func->parameters())
-          FuncParams.push_back(
-              Context.getCanonicalType(P->getType().getUnqualifiedType()));
-        if (llvm::ArrayRef(FuncParams) == Params) {
+          FuncParams.push_back(P->getType().getUnqualifiedType());
+        if (std::equal(FuncParams.begin(), FuncParams.end(), Params.begin(),
+                       Params.end(), [&](auto &LT, auto &RT) {
+                         return Context.getCanonicalType(LT) ==
+                                Context.getCanonicalType(RT);
+                       })) {
----------------
mizvekov wrote:

```suggestion
                       Params.end(), [&](QualType LT, QualType RT) {
                         return Context.hasSameType(LT, RT);
                       })) {
```

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


More information about the libcxx-commits mailing list