[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
Sat Jun 28 13:44:33 PDT 2025


================
@@ -7248,6 +7250,22 @@ QualType TreeTransform<Derived>::TransformDependentBitIntType(
   return Result;
 }
 
+template <typename Derived>
+QualType TreeTransform<Derived>::TransformPredefinedSugarType(
+    TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) {
+  const PredefinedSugarType *EIT = TL.getTypePtr();
+  QualType Result = TL.getType();
+
+  if (getDerived().AlwaysRebuild()) {
+    Result = getDerived().RebuildPredefinedSugarType(
+        llvm::to_underlying(EIT->getKind()));
+  }
+
+  PredefinedSugarTypeLoc NewTL = TLB.push<PredefinedSugarTypeLoc>(Result);
+  NewTL.setNameLoc(TL.getNameLoc());
+  return Result;
+}
----------------
YexuanXiao wrote:

https://github.com/llvm/llvm-project/blob/f90025ebd930a4719f3d7ac61d802ce948f9f433/clang/lib/Sema/TreeTransform.h#L671 declares it.

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


More information about the libcxx-commits mailing list