Classify wrapper call-args by their Doxygen @param documentation#66
Merged
estebanzimanyi merged 1 commit intoJul 17, 2026
Conversation
The bound-literal pass reports a wrapper call argument as unclassified drift when it is a bare identifier that is neither caller-sourced (PG_GETARG or an =-assigned local), an out-param, nor a literal. That heuristic misses a local filled by reference (`int count; temparr_extract(array, &count)`) or by a macro (`INPUT_AGG_TRANS_STATE(fcinfo, state, ...)`): the identifier names a real MEOS parameter the wrapper derives, not a literal to bind. Those parameters are documented systematically in the MEOS Doxygen — `@param[in] count`, `@param[in,out] state` — so consume that. extract_param_names gathers every @param-documented parameter name, and the bound-literal pass skips a bare-identifier argument bound to a documented parameter. Drift is then confined to a genuinely undocumented parameter, the exceptional case worth inspecting. Regenerating the catalog now reports zero unclassified wrapper args (previously eight: count in tsequence_make, tsequenceset_make, tsequenceset_make_gaps and temporal_merge_array; count1 and count2 in mindistance_tgeoarr_tgeoarr; state in the tcount transition functions), with the bound-literal count unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bound-literal pass reports a wrapper call argument as unclassified drift when it is a bare identifier that is neither caller-sourced (
PG_GETARGor an=-assigned local), an out-param, nor a literal. That heuristic misses a local filled by reference (int count; temparr_extract(array, &count)) or by a macro (INPUT_AGG_TRANS_STATE(fcinfo, state, ...)): the identifier names a real MEOS parameter the wrapper derives, not a literal to bind.Those parameters are documented systematically in the MEOS Doxygen —
@param[in] count,@param[in,out] state— so the classifier consumes that signal.extract_param_namesgathers every@param-documented parameter name (scanned from the same source rootmerge_outparamsuses), and the bound-literal pass skips a bare-identifier argument bound to a documented parameter. Drift is confined to a genuinely undocumented parameter — the exceptional case worth inspecting.With this signal the catalog regen reports zero unclassified wrapper args. The arguments it covers —
countintsequence_make,tsequenceset_make,tsequenceset_make_gapsandtemporal_merge_array;count1/count2inmindistance_tgeoarr_tgeoarr;statein the tcount transition functions — are recognised as documented parameters, and the bound-literal count is unchanged.Two regression tests cover the documented-parameter (skip) and undocumented-parameter (drift) paths.