[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 cfe-commits cfe-commits at lists.llvm.org
Mon Jun 30 05:07:42 PDT 2025


================
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final
     : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, DependentBitIntTypeLoc,
                                        DependentBitIntType> {};
 
+class PredefinedSugarTypeLoc final
+    : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, PredefinedSugarTypeLoc,
+                                       PredefinedSugarType> {};
----------------
mizvekov wrote:

One thing is having to define a class, another thing is if that class is actually used.

We could make this an empty thing which stores nothing, and make it's methods unreachable where possible.

My question is more about, do we actually create these when compiling programs? I'd suspect if we do, it would have to be through creating trivial type source infos as a workaround somewhere.

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


More information about the cfe-commits mailing list