[Lldb-commits] [lldb] [lldb] Add GetPointerDiffType to TypeSystemClang (PR #185314)
Ilia Kuklin via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 9 15:47:53 PDT 2026
================
@@ -360,6 +362,17 @@ TEST_F(TestTypeSystemClang, TestBuiltinTypeForEmptyTriple) {
TypeSystemClang::CompleteTagDeclarationDefinition(record_type);
}
+TEST_F(TestTypeSystemClang, TestGetPointerDiffType) {
+ CompilerType ptrdiff_t = m_ast->GetPointerDiffType(/*is_signed=*/true);
+ EXPECT_EQ(ptrdiff_t.GetDisplayTypeName(), "__ptrdiff_t");
----------------
kuilpd wrote:
I just thought confirming that it's `__ptrdiff_t` is enough, and since I can't know exactly the type name for the unsigned version, I checked the sign and size instead. But I'll add the checks for the signed anyway.
https://github.com/llvm/llvm-project/pull/185314
More information about the lldb-commits
mailing list