Skip to main content

Module identity

Module identity 

Source
Expand description

Which C++ callable is which: declaration/definition roles, the linkage evidence that unifies a header declaration with its .cpp definition, and the #1134 resolution-time identity reconciliation built on top of both.

Two things stay in analyzer/cpp/identity.rs on purpose:

  • cpp_header_body_files_are_related here takes the implementation file’s #include lines and the include-target index as arguments. The analysis wrapper of the same name owns the resolve_analyzer::<CppAnalyzer> downcast that produces them, because the searchtools identity block reaches this predicate through &dyn IAnalyzer and there is no capability that carries an IncludeTargetIndex.
  • The moka cells that memoize cpp_reconcile_candidates per member identifier and cpp_reconcile_group per CppReconcileGroupKey stay on the analyzer, as does every other cache, so IAnalyzer::update keeps rebuilding them wholesale.

Structs§

CppOccurrenceClassifier
CppReconcileCandidates
Every callable declaration in the workspace sharing one member identifier, bucketed by its terminal owner segment.
CppReconcileGroupKey
Which candidates one reconcile group covers: a member identifier, and the terminal owner component that #1566’s pre-filter admits.
CppReconciledDefinitionIndex
The #1134 resolution-time identity-reconciliation overlay for one queried canonical fq_name.

Enums§

CppCallableUnitRole
CppOccurrenceRole

Functions§

cpp_callable_definitions_share_identity_evidence
Whether left and right are the same callable seen twice.
cpp_callable_unit_role
cpp_header_body_files_are_related
Direct include evidence relates one header declaration to one implementation file without pretending that every external name in a workspace belongs to one linker unit.
cpp_header_body_implementation_file
Which of left/right the include evidence would read as the header, if either. The analysis wrapper uses this to decide which file’s imports to read before paying for them.
cpp_indexed_callable_linkage
cpp_is_constructor_or_destructor_declarator_name
Return whether node is the declarator name of a constructor or destructor – the declaration occurrence itself, never a reference to one.
cpp_is_range_for_binding_name
Return whether node is one of the names declared by a range-for declarator. Follow only declarator fields. This keeps identifiers in array bounds and attributes in the range-for header as references.
cpp_occurrence_role_for_range
cpp_reconcile_candidates
Read and bucket every callable declaration sharing member_identifier.
cpp_reconcile_group
Reconcile every candidate one group key admits, grouped by the canonical fq_name each re-keyed definition belongs under.
cpp_reconcile_group_key
Which member identifier and owner terminal a queried canonical name asks about, or None when the name has no terminal segment to probe with.
cpp_source_path_is_header