mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-06 08:35:21 +08:00
Add C/C++ hybrid LSP resolver with type-aware call resolution
Implement a tree-sitter-based type evaluator for C/C++ that resolves method calls, template instantiations, and cross-file references without requiring a full compiler. Covers ~95% of C and ~93% of moderate C++. Key features: - Type-aware overload resolution scoring by parameter types - Lambda return type inference (trailing return + body deduction) - Inline namespace normalization (__1, __cxx11, __gnu_cxx) - Implicit conversions (char*->string, numeric promotions) - Virtual dispatch with override preference - CRTP detection and self-type resolution - Range-for iterator protocol (maps, custom containers) - Smart pointer arrow dispatch (unique_ptr, shared_ptr) - Dependent member calls in templates via pending call resolution - Explicit template argument substitution (make_shared<T>) - Nested class scope resolution - C/C++ stdlib type stubs (containers, strings, I/O, smart ptrs) - Cross-file LSP with compile_commands.json support - C/C++ parameter extraction via declarator chain traversal 63+ test cases covering all resolution strategies.
This commit is contained in: