C++ Support in Maguyva: Class and Call Graphs at Scale
C++ hides the real call target behind namespaces, overloads, and virtual dispatch. The graph helps an agent find it.
Extensions
.c, .c++, .cc, .cpp, +6 more
Maguyva parses C with AST, symbol, and graph support, so AI agents can trace functions, structs, includes, and callers in systems, firmware, and library code.
C has no classes or modules to organize it. Structure lives in function calls, headers, and structs, and the same name can appear in comments, macros, and string literals. Export and annotation macros wrap declarations, which trips up tools that only parse plain C. For an agent, the safe first step is the call graph.
Maguyva builds that graph so an agent can see what a function reaches and what reaches it before it proposes a change.
Maguyva covers .c and .h. Function definitions are extracted as symbols, and structs and unions are selectable as type definitions in structural search. #include directives become import relationships.
Export and visibility macros (patterns such as FOO_API, DLLEXPORT, or LIBEXPORT) and thread-safety annotation macros (such as GUARDED_BY and REQUIRES) are masked before parsing, so declarations wrapped in them still parse as declarations. Function-like macro bodies are parsed; object-like macro bodies are not.
The graph records calls, includes, compound-literal instantiation, type references, reads and writes, and control flow. About 124 standard C library calls (printf, malloc, free, memcpy, strlen, and similar) are filtered from relationships so project code stands out.
uart_write, directly or through other functions?” (dependency_search incoming)config.h, and which of its structs do they use?” (dependency_search, then find_symbol)get_task_context).h appears in the C, C++, and Objective-C extension lists, so mixed-language headers are shared between those profiles.text_pattern_search when you need every malloc or memcpy.Connect a repository with the quickstart, then check the support matrix on the compatibility page. For C++ code in the same tree, read the C++ guide.
Best fit
Agent workflows
Engine details
Useful MCP entry points
Use it for a function or struct name when you need the definition and every reference.
Use incoming traversal on a shared function before changing its signature or error handling.
Use it for prompts like “explain how a packet moves from the receive interrupt to the protocol parser.”
Related guides
C++ hides the real call target behind namespaces, overloads, and virtual dispatch. The graph helps an agent find it.
Extensions
.c, .c++, .cc, .cpp, +6 more
Relevant when you want AI assistance in Rust without losing the structural guardrails that make Rust worth using.
Extensions
.rs