[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)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 4 16:16:47 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();
----------------
YexuanXiao wrote:
It causes erroneous diagnostics "operator new/delete is ambiguous" in the tests Modules/new-delete.cpp, PCH/cxx-exprs.cpp, PCH/cxx1z-aligned-alloc.cpp, SemaCXX/delete.cpp, and OpenMP/declare_target_codegen.cpp. I investigated but couldn't find a suitable reason.
https://github.com/llvm/llvm-project/pull/143653
More information about the libcxx-commits
mailing list