[Lldb-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 7 07:55:14 PDT 2025


================
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
     unsigned NumExpansions;
   };
 
+  enum class PredefinedSugarKind {
+    /// The "size_t" type.
+    SizeT,
+
+    /// The signed integer type corresponding to "size_t".
----------------
YexuanXiao wrote:

@frederick-vs-ja [mentioned in the comment above](https://github.com/llvm/llvm-project/pull/143653#discussion_r2141546366) that POSIX does not require the `typedef` `ssize_t` to be the `signed` version of `size_t`. At the same time, the C and C++ standards also do not require the `typedef` `ptrdiff_t` to be the `signed` version of `size_t`. I am not sure whether there actually exist platforms with such inconsistencies, but perhaps it should not be confused?

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


More information about the lldb-commits mailing list