Skip to main content

build_source_using_index

Function build_source_using_index 

Source
pub fn build_source_using_index(
    cpp: &dyn CppSource,
    file: &ProjectFile,
) -> SourceUsingIndex
Expand description

Build the per-file structured using index for file.

The result is a pure function of the file’s parsed content, which is what lets CppSource::source_using_index memoize it on the analyzer (#1927): a VisibilityIndex is rebuilt per usage query, and rebuilding this index per query re-walked a 9.5 MB amalgamation’s AST for every candidate.