Skip to content

C/C++: index and query multiple compilation configurations with edge provenance #2267

Description

@knewstimek

What problem does this solve?

C/C++ source can produce different definitions and calls under different -D flags. One unconfigured graph can miss an active branch or combine mutually exclusive edges without saying which build supports them. #946 reports a related conditional-compilation parse failure; this request concerns configuration-aware indexing and queries.

Synthetic example:

void use_fast();
void use_safe();
void dispatch() {
#ifdef FAST_MODE
    use_fast();
#else
    use_safe();
#endif
}

The FAST_MODE build should show dispatch -> use_fast; the other build should show dispatch -> use_safe. A combined result should label the supporting configurations.

Proposed solution

Please support at least two named C/C++ compilation configurations, ideally from compile_commands.json or explicit compiler flags. Preserve configuration provenance on definitions and call edges, including variants of one symbol. Let users query a selected configuration or a combined view with provenance. Deduplicate shared edges, bound indexing work, and test branch-specific calls, changed signatures, and shared calls.

Acceptance criterion: a caller can tell whether each result belongs to the selected build.

Alternatives considered

Separate indexes per build fragment navigation and duplicate data. An unlabeled union loses the context needed to interpret branch-specific edges.

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