Author: Michael Buch
Date: 2026-01-13T11:25:31Z
New Revision: 762512f92f63ff00e2cf98b71d15d0209159eed6

URL: 
https://github.com/llvm/llvm-project/commit/762512f92f63ff00e2cf98b71d15d0209159eed6
DIFF: 
https://github.com/llvm/llvm-project/commit/762512f92f63ff00e2cf98b71d15d0209159eed6.diff

LOG: [lldb][tests] Add signed-ness tests for _BitInt

We have special logic for creating `_BitInt` types by name. This patch adds 
tests to ensure we create the types with the correct signed-ness.

Added: 
    

Modified: 
    lldb/unittests/Symbol/TestTypeSystemClang.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/unittests/Symbol/TestTypeSystemClang.cpp 
b/lldb/unittests/Symbol/TestTypeSystemClang.cpp
index 174e4d6bf1ed7..c3290e0616c89 100644
--- a/lldb/unittests/Symbol/TestTypeSystemClang.cpp
+++ b/lldb/unittests/Symbol/TestTypeSystemClang.cpp
@@ -360,6 +360,16 @@ TEST_F(TestTypeSystemClang, TestBuiltinTypeForEmptyTriple) 
{
   TypeSystemClang::CompleteTagDeclarationDefinition(record_type);
 }
 
+TEST_F(TestTypeSystemClang, TestGetBuiltinTypeByName_BitInt) {
+  auto holder =
+      std::make_unique<clang_utils::TypeSystemClangHolder>("bitint_ast");
+  auto &ast = *holder->GetAST();
+
+  EXPECT_TRUE(ast.GetBuiltinTypeByName(ConstString("_BitInt(26)")).IsSigned());
+  EXPECT_FALSE(
+      ast.GetBuiltinTypeByName(ConstString("unsigned 
_BitInt(26)")).IsSigned());
+}
+
 TEST_F(TestTypeSystemClang, TestDisplayName) {
   TypeSystemClang ast("some name", llvm::Triple());
   EXPECT_EQ("some name", ast.getDisplayName());


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to