Repository navigation
C/C++: DEFINE_PROPERTY / DEFINE_MAP_OPTION / DEFINE_CLASS_PROPERTY name their first argument (Part of #5461) - #5545
Conversation
…me their first argument (Part of #5461) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
PR #5545 @ 177d9dd: 1 failed check(s) == graph-accuracy-audit (failure) -- real |
|
Opus rescue: the only red check, Merged |
|
No description provided. |
|
No description provided. |
|
PR #5545 @ 3591a68: 1 failed check(s) == graph-accuracy-audit (failure) -- real |
Part of #5461 (slice 2; slice 1 = #5483).
What
The macro-introduced-definition name rule: the identifier argument is not always the second.
C_MACRO_FIRST_ARG_NAMES(_shared_patterns.py) lists the macros that name their FIRST argument:DEFINE_PROPERTY(name, Type, Class),DEFINE_INFO_PROPERTY,DEFINE_CLASS_PROPERTY,DEFINE_MAP_OPTION(name, true). Exact names only:DEFINE_CLASS_PROPERTY_PREFIX(prefix, name, Type, Class)keeps the general rule (second arg, already right) andDEFINE_PROPERTYKEYis;-terminated.DEFINE_CLASS_PROPERTY*is exempted from the class-like (*CLASS*) exclusion, which wrongly dropped it. Before:DEFINE_PROPERTY(accuracy, I, Actor) {was namedI, andDEFINE_MAP_OPTION(aircontrol, true)was namedtrue.Files:
_shared_patterns.py,test_c_macro_funcs_5461.py(+18 cases, C and C++: each shape, the PREFIX neighbour,_NATIVEneighbour,PROPERTYKEY). No other file changed; the shared source feedsc.py,cpp.pyanddetector.py.Class table (macro-introduced definitions)
DEFINE_PROPERTY,DEFINE_INFO_PROPERTY,DEFINE_CLASS_PROPERTY,DEFINE_MAP_OPTIONDEFINE_CLASS_PROPERTY_PREFIXCCMD,DEFINE_ACTION_FUNCTION*,CUSTOM_CVAR[D],BEGIN_COMMAND,TEST[_F],FUNC...)Rescan evidence (worktree engine; scratch scans of doom-study/repos/)
Functions whose start line is a column-0
MACRO(; first-arg family named correctly vs wrongly:FUNChandlers nowMACRO(on the start line or the line above it); the r2 scans predate #5483 on a different engine, so only the first-arg naming andFUNCcolumns are attributable to a single change. Top handlers now (gzdoom):DEFINE_ACTION_FUNCTION_NATIVE705,DEFINE_ACTION_FUNCTION613,CCMD307,FUNC237,CUSTOM_CVAR231,DEFINE_MAP_OPTION80,DEFINE_PROPERTY44.Gates
Goldens (
golden-lock.sh crucible_check.py --update --yes): both fixtures zero drift.tree_sitter_accuracy_audit --lang c/cpp --ci: OK.pr_gates --fast6/6,--ratchets8/8.tests/extraction/languages: 9651 passed. Tree-wide guards + new test file: 254 passed.Sibling gaps
#definelookup is same-file only (a header-definedFUNCkeeps the invocation rule): no repo-wide macro table (C/C++: function-defining macros (CCMD, DEFINE_ACTION_FUNCTION, FUNC, TEST) are functions (Part of #5461) #5483 limit).DEFINE_PROPERTYKEY,ADD_STAT,MIXER,DECLARE_FLUID_RVOICE_FUNCTION,UNITetc. name by the general rule; not audited individually. Burned-estate programs: none (C/C++ only).🤖 Generated with Claude Code