reindex_file
Re-parse a source file after editing to update symbol index, avoiding full rebuild. Regenerates LLM analysis when enabled.
Instructions
Re-parse a single source file with libclang and update its symbols in the index.
Not read-only — uses the exact compiler flags from compile_commands.json.
The file must be listed in compile_commands.json (headers are re-indexed
via the translation unit that includes them). Use after editing a file to
keep the index current without a full rebuild.
Also regenerates LLM analysis and method override relationships for affected symbols when those features are enabled in config.
Args: file_path: Path to source file to re-parse. Must be in compile_commands.json. project_root: Project root directory. Auto-detected if omitted.
Returns: dict: {file, translation_units, symbols_updated, elapsed_s, analysis_updated (if LLM enabled), or error}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to source file to re-parse. Must be in compile_commands.json. | |
| project_root | No | Project root. Auto-detected if omitted. |