Skip to content

C func_recall_pct: Regex Limitations and Tree-Sitter Anomalies #1754

Closed

Description

@squid-protocol

C function recall drops due to both real regex limitations and tree-sitter ground truth anomalies.

GitGalaxy Regex Limitations (False Negatives):

  • Macros in Parameter Lists: Functions that wrap a parameter name in a macro (e.g., Py_UNUSED(consts)) cause the parser to fail.
  • Function Pointer Arguments: Functions taking function pointers as arguments (e.g., int (*cmp)(const char*, const char*)) confuse the regex.
  • Pre-processor Macros in Annotations / Return Types: Complex annotations and macros scattered between the return type and the function name (especially across multiple lines) are skipped.

Tree-Sitter Parsing Anomalies (Ground-Truth Gaps, Not GitGalaxy's fault):

  • Switch Cases / Labels: Macros formatted as labels with blocks are erroneously parsed by tree-sitter as function definitions.
  • Macro Expansions: When a macro generates a function name, tree-sitter incorrectly reports the literal macro name as the function definition.
  • Keywords as Functions: Tree-sitter occasionally suffers from parse-error cascades, treating keywords (like if) or array initializers as functions.

Activity

  1. added
    bug
    core-engine
    threat: false-negative
    testing
    on Aug 16, 2026
  2. added this to the v2.4.8 milestone on Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-enginetestingthreat: false-negative

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions