Implement query search function #15

Closed
opened 2026-09-03 14:22:18 +00:00 by JayKobe6k · 0 comments
Owner

Goal

Search function declarations/definitions by identity, scope, signature, and parameter constraints.

Filters

Support the applicable common identity/scope filters from value search, including --identifier, --translation-unit, --name, and enclosing function/struct where C permits them, plus:

  • --min-params <n>: inclusive minimum parameter count.
  • --max-params <n>: inclusive maximum parameter count.
  • repeatable --parameter-type <regex>: every supplied regex must match at least one parameter's canonical type.
  • repeatable --parameter-name <regex>: every supplied regex must match at least one parameter name.
  • --param-list-regex <regex>: matches the canonical parameter-list text inside the parentheses only.

All filter families combine with AND. Different parameter regexes may match different parameters; document whether one parameter may satisfy more than one regex. Define behavior for unnamed parameters, void, variadics, old-style declarations, function pointers, and declaration/definition duplicates.

Acceptance criteria

  • Results canonicalize declarations and definitions according to a documented policy and include signature, linkage, TU/scope, source anchors, and a durable function handle.
  • Tests cover zero/many parameters, unnamed parameters, pointers/qualifiers/arrays, variadics, repeated declarations, static functions in different TUs, all parameter filter combinations, impossible min/max ranges, and invalid regexes.
  • --param-list-regex excludes surrounding parentheses and uses one documented canonical spacing/type representation.
  • Shared max/group/order behavior from #13 is supported, with invalid grouping fields rejected.
  • CLI handlers remain adapters over a typed function-search service and repository query.

Dependencies

Depends on searchable function/type facts from #7 and shared search behavior from #13.

## Goal Search function declarations/definitions by identity, scope, signature, and parameter constraints. ## Filters Support the applicable common identity/scope filters from value search, including `--identifier`, `--translation-unit`, `--name`, and enclosing function/struct where C permits them, plus: - `--min-params <n>`: inclusive minimum parameter count. - `--max-params <n>`: inclusive maximum parameter count. - repeatable `--parameter-type <regex>`: every supplied regex must match at least one parameter's canonical type. - repeatable `--parameter-name <regex>`: every supplied regex must match at least one parameter name. - `--param-list-regex <regex>`: matches the canonical parameter-list text inside the parentheses only. All filter families combine with AND. Different parameter regexes may match different parameters; document whether one parameter may satisfy more than one regex. Define behavior for unnamed parameters, `void`, variadics, old-style declarations, function pointers, and declaration/definition duplicates. ## Acceptance criteria - Results canonicalize declarations and definitions according to a documented policy and include signature, linkage, TU/scope, source anchors, and a durable function handle. - Tests cover zero/many parameters, unnamed parameters, pointers/qualifiers/arrays, variadics, repeated declarations, static functions in different TUs, all parameter filter combinations, impossible min/max ranges, and invalid regexes. - `--param-list-regex` excludes surrounding parentheses and uses one documented canonical spacing/type representation. - Shared max/group/order behavior from #13 is supported, with invalid grouping fields rejected. - CLI handlers remain adapters over a typed function-search service and repository query. ## Dependencies Depends on searchable function/type facts from #7 and shared search behavior from #13.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
JayKobe6k/ClariTree#15
No description provided.