diff options
| author | Matej Košík <m4tej.kosik@gmail.com> | 2026-01-13 10:03:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-13 09:03:49 +0000 |
| commit | 8aa9c717f6bf6a8844c109742d520805c50003ab (patch) | |
| tree | 168e57cd4757d1e7183112d330ee5fa335dd9e01 /lldb/test/API/python_api | |
| parent | 4ef3f8dbc1c3ac4e15731d43b2ae350dc52d6c0f (diff) | |
| download | llvm-8aa9c717f6bf6a8844c109742d520805c50003ab.zip llvm-8aa9c717f6bf6a8844c109742d520805c50003ab.tar.gz llvm-8aa9c717f6bf6a8844c109742d520805c50003ab.tar.bz2 | |
[lldb] Make sure that the "TypeSystemClang::GetBuiltinTypeByName" method returns the correct value also for "_BitInt(...)" types. (#165857)
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 <matej.kosik@codasip.com>
Co-authored-by: Michael Buch <michaelbuch12@gmail.com>
Diffstat (limited to 'lldb/test/API/python_api')
| -rw-r--r-- | lldb/test/API/python_api/sbtype_basic_type/TestSBTypeBasicType.py | 16 |
1 files changed, 16 insertions, 0 deletions
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 f8594df..784f3e1 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) |
