From 8aa9c717f6bf6a8844c109742d520805c50003ab Mon Sep 17 00:00:00 2001 From: Matej Košík Date: Tue, 13 Jan 2026 10:03:49 +0100 Subject: [lldb] Make sure that the "TypeSystemClang::GetBuiltinTypeByName" method returns the correct value also for "_BitInt(...)" types. (#165857) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When trying to get the `SBType` object corresponding to the `_BitInt(...)` type name, we have noticed that the `SBTarget::FindFirstType` metod returns `nil`. This branch proposes: - some test that demonstrate that the problem exists - a possible fix --------- Co-authored-by: Matej Košík Co-authored-by: Michael Buch --- .../python_api/sbtype_basic_type/TestSBTypeBasicType.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lldb/test/API/python_api') diff --git a/lldb/test/API/python_api/sbtype_basic_type/TestSBTypeBasicType.py b/lldb/test/API/python_api/sbtype_basic_type/TestSBTypeBasicType.py index f8594dfc6b78..784f3e177d97 100644 --- a/lldb/test/API/python_api/sbtype_basic_type/TestSBTypeBasicType.py +++ b/lldb/test/API/python_api/sbtype_basic_type/TestSBTypeBasicType.py @@ -36,3 +36,19 @@ class TestCase(TestBase): # Check the size of the chosen aliases of basic types. self.assertEqual(self.target().FindFirstType("__int128_t").size, 16) self.assertEqual(self.target().FindFirstType("__uint128_t").size, 16) + + self.assertFalse(self.target().FindFirstType("_BitInt")) + self.assertFalse(self.target().FindFirstType("unsigned _BitInt")) + self.assertFalse(self.target().FindFirstType("_BitInt()")) + self.assertFalse(self.target().FindFirstType("unsigned _BitInt()")) + self.assertFalse(self.target().FindFirstType("_BitInt(65")) + self.assertFalse(self.target().FindFirstType("unsigned _BitInt(65")) + self.assertFalse(self.target().FindFirstType("_BitInt(0x41)")) + self.assertFalse(self.target().FindFirstType("unsigned _BitInt(0x41)")) + self.assertEqual(self.target().FindFirstType("_BitInt(65)").name, "_BitInt(65)") + self.assertEqual(self.target().FindFirstType("_BitInt(65)").size, 16) + self.assertEqual( + self.target().FindFirstType("unsigned _BitInt(65)").name, + "unsigned _BitInt(65)", + ) + self.assertEqual(self.target().FindFirstType("unsigned _BitInt(65)").size, 16) -- cgit v1.2.3