================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits