Expand description
C++ language knowledge for Bifrost.
Internal implementation detail of brokk-bifrost; no stability guarantees –
depend on brokk-bifrost instead.
This crate sits between brokk_bifrost_core and brokk-bifrost-analysis.
It holds C++ language knowledge – the declaration walk with its
macro-sentinel error recovery, #include parsing and include-target
resolution, out-of-line member identity reconciliation, the structural spec,
test detection, clone normalization, compile-database ingestion and the
usage-graph scans – as plain functions and data. It depends on no other
Bifrost crate than core, so nothing here may name IAnalyzer,
TreeSitterAnalyzer, or CppAnalyzer.
Where analysis code would reach for an analyzer handle, the functions here
take a C++ source trait – a core
brokk_bifrost_core::analyzer::CodeUnitIndex plus the memoized C++
products the language logic resolves through. analyzer/cpp/ in
brokk-bifrost-analysis keeps the shim: the CppAnalyzer struct with its
five moka caches, three OnceLock cells, one PoolSafeMemo and six
test-support counters, the CodeUnitIndex impl carrying the #1134
reconciliation overlay, the IAnalyzer impl, the CppAdapter forwarding
shell, the SPI block, and the downcasts that produce the arguments.
Modules§
- adapter
- The C++ answers behind
CppAdapter. - call_
match - Overload disambiguation for C++ call sites.
- clones
- Token and AST-label normalization for C++ structural-clone candidates.
- compile_
context compile_commands.jsoningestion.- declarations
- The C++ declaration walk, including the macro-sentinel error recovery.
- diagnostics
- C++’s semantic diagnostics: unrecognized-type reporting with stated proof.
- external_
declarations - Structured declaration extraction for external C++ headers.
- graph
- The C++ usage graph’s language knowledge.
- graph_
support - The analyzer-resident products C++’s language logic resolves through.
- hierarchy
- C++ type-hierarchy resolution: the include-visible class table and the
namespace/alias search that turns a written base specifier into a
CodeUnit. - identity
- Which C++ callable is which: declaration/definition roles, the linkage
evidence that unifies a header declaration with its
.cppdefinition, and the #1134 resolution-time identity reconciliation built on top of both. - imports
#includeparsing and the workspace-wide include-target index.- queries
- C++’s bundled tree-sitter query assets.
- raii
- Provable temporary-free classification of C++ call expressions.
- reconcile
- Resolution-time identity reconciliation for C++ out-of-line member definitions (#1134).
- structural
- C++ structural spec for
query_code. - test_
detection - C++ test-file recognition and test-assertion smell detection.