Skip to content

C/C++: recover candidate calls from partially parsed ranges with explicit confidence #2266

Description

@knewstimek

What problem does this solve?

C/C++ macro wrappers and malformed regions can leave call edges absent even when surrounding definitions are indexed. A caller query can then appear complete despite parse_partial or parse_unusable coverage. This is related to #946, but requests recovery of call evidence after partial parsing.

Synthetic example:

#define WRAP_BEGIN try {
#define WRAP_END } catch (...) {}
void send_message();
void run() {
    WRAP_BEGIN
    send_message();
    WRAP_END
}

An unexpanded parse may miss run -> send_message.

Proposed solution

Please add a conservative fallback for affected C/C++ ranges. Recover candidate direct calls through a bounded lexical pass or another suitable method. Mark recovered edges with their extraction method and lower confidence, retain parse-coverage warnings, and leave ambiguous targets unresolved rather than claiming a definite edge. Add synthetic tests for wrappers, comments, strings, member calls, and overloads.

Acceptance criterion: inbound traces can expose plausible calls from partial parses while clearly distinguishing them from AST-derived edges.

Alternatives considered

Manual source inspection does not support repeated graph queries. Full preprocessing helps when a reliable compilation configuration exists, but a fallback is still useful when it does not.

Confirmations

  • I searched existing issues and this is not a duplicate.

Activity

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

    parsing/qualityGraph extraction bugs, false positives, missing edges

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions