Add clangd navigation helper

This commit is contained in:
2026-06-04 16:03:03 +02:00
parent bc3973ef15
commit 576b58b061
4 changed files with 473 additions and 0 deletions

View File

@@ -75,6 +75,8 @@ cmake --preset android-arm64
powershell -ExecutionPolicy Bypass -File scripts\automation\platform-build.ps1 -Presets android-arm64
powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -Preset windows-msvc-default -Configuration Debug
cmake --fresh --preset windows-clangcl-asan
python scripts/dev/clangd_nav.py symbols --file src/app_core/brush_ui.h --name execute_brush
python scripts/dev/clangd_nav.py definition --file src/node_panel_brush.cpp --line 511 --column 39
```
Known local toolchain state:
@@ -88,6 +90,14 @@ Known local toolchain state:
- clang-cl: `C:\Program Files\LLVM\bin\clang-cl.exe` reports 18.1.8, but the
selected VS 2026-preview STL expects Clang 20 or newer; see DEBT-0014 before
treating `windows-clangcl-asan` as a passing sanitizer gate.
- clangd/clang-query/clang-tidy are installed under `C:\Program Files\LLVM\bin`.
`scripts/dev/clangd_nav.py` provides agent-friendly symbol, definition,
declaration, implementation, reference, and hover lookup through clangd using
the current `compile_commands.json` from `windows-clangcl-asan`,
`android-arm64`, or a caller-provided build directory. It disables clangd
background indexing by default for quick current-translation-unit lookups; pass
`--background-index` when broader cross-file references are worth the extra
indexing work.
- Android arm64 headless configure/build passes through root CMake and the
`platform-build` automation wrapper for `pp_foundation`, `pp_assets`,
`pp_paint`, `pp_document`, `pp_renderer_api`, `pp_renderer_gl`,