From 4ac5bbb5deda4bdb532623716ba2692200cdb869 Mon Sep 17 00:00:00 2001 From: andrewwhitecdw Date: Thu, 13 Aug 2026 17:55:52 -0500 Subject: [PATCH] fix: anonymous struct detection uses wrong spelling marker Signed-off-by: andrewwhitecdw --- ci/check_c_abi/check_c_abi/abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/check_c_abi/check_c_abi/abi.py b/ci/check_c_abi/check_c_abi/abi.py index 069bb19ae4..81dac552a5 100644 --- a/ci/check_c_abi/check_c_abi/abi.py +++ b/ci/check_c_abi/check_c_abi/abi.py @@ -21,10 +21,10 @@ def colored(text, *args, **kwargs): def _is_unnamed_struct(cursor: clang.cindex.Cursor) -> bool: + # Anonymous record declarations have no tag, so libclang reports an empty spelling. return ( cursor.kind == clang.cindex.CursorKind.STRUCT_DECL - and cursor.spelling.startswith("struct ") - and "unnamed " in cursor.spelling + and not cursor.spelling )