From c46094acf3923c910f2737879d7660c1b422ffc4 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 15 May 2026 15:17:17 -0700 Subject: [PATCH] Fix NCC bug with union members --- tools/ncc/ncc.py | 4 ++-- tools/ncc/skip.yml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/ncc/ncc.py b/tools/ncc/ncc.py index 89ad5dbcde..e559c696c9 100644 --- a/tools/ncc/ncc.py +++ b/tools/ncc/ncc.py @@ -155,7 +155,7 @@ def get_scope_prefix(self, node, scope=None): return self.scope_prefix_rule.global_prefix elif (scope is CursorKind.CLASS_DECL) or (scope is CursorKind.CLASS_TEMPLATE): return self.scope_prefix_rule.class_member_prefix - elif (scope is CursorKind.STRUCT_DECL): + elif (scope is CursorKind.STRUCT_DECL) or (scope is CursorKind.UNION_DECL): return self.scope_prefix_rule.struct_member_prefix return "" @@ -617,7 +617,7 @@ def do_validate(options, filename): if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s', - filename='log.txt', filemode='w') + filemode='w') """ Parse all command line arguments and validate """ op = Options() diff --git a/tools/ncc/skip.yml b/tools/ncc/skip.yml index 06c6e0a5b0..995717d2fa 100644 --- a/tools/ncc/skip.yml +++ b/tools/ncc/skip.yml @@ -15,8 +15,6 @@ p_HELDesc: 'Allow this variable name' e_RAMStream: 'Allow this enum constant' p_RLE: 'Allow this parameter name' p_milliseconds: 'Probably a bug with function call' -m_increaseAmount: "Can't currently detect member in union" -m_increaseFactor: "Can't currently detect member in union" delta_rad: "Allow original naming from 1996" delta_pos: "Allow original naming from 1996" rot_mat: "Allow original naming from 1996"