From 4c85bf2fe8042c855c9dd5be4b02191e9d071ffd Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 17 Jul 2025 21:04:01 -0700 Subject: Revert "[Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (#143653)" This reverts commit c27e283cfbca2bd22f34592430e98ee76ed60ad8. A builbot failure has been reported: https://lab.llvm.org/buildbot/#/builders/186/builds/10819/steps/10/logs/stdio I'm also getting a large number of warnings related to %zu and %zx. --- clang/lib/CodeGen/CodeGenFunction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index ab345a5..0fda31c 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -720,7 +720,7 @@ static bool matchesStlAllocatorFn(const Decl *D, const ASTContext &Ctx) { (MD->getNumParams() != 1 && MD->getNumParams() != 2)) return false; - if (!Ctx.hasSameType(MD->parameters()[0]->getType(), Ctx.getSizeType())) + if (MD->parameters()[0]->getType().getCanonicalType() != Ctx.getSizeType()) return false; if (MD->getNumParams() == 2) { @@ -2491,7 +2491,6 @@ void CodeGenFunction::EmitVariablyModifiedType(QualType type) { case Type::ObjCObjectPointer: case Type::BitInt: case Type::HLSLInlineSpirv: - case Type::PredefinedSugar: llvm_unreachable("type class is never variably-modified!"); case Type::Elaborated: -- cgit v1.1