Improve compilation database for agents. (#7790)

Remove claim from script that it takes minutes; this caused Claude to
decide to not run it. It only takes a few seconds these days. Add note
in toolchain development skill that lints won't be accurate if the
compilation database is outdated.

Assisted-by: Claude Opus 5 via Antigravity
This commit is contained in:
Richard Smith
2026-09-16 20:12:32 +00:00
committed by GitHub
parent 59c1d6ff39
commit 843c7ce498
2 changed files with 6 additions and 4 deletions
@@ -158,3 +158,8 @@ operations, inspect target LLVM ADT class APIs:
8. **Redundant bounds calculations**: Avoid repeating calculations of complex
boundary estimations (such as lower and upper bound estimations). Refactor
the logic to calculate unified values once, preserving compactness.
9. **Trusting stale `clangd` diagnostics**: In-editor diagnostics are only as
good as `compile_commands.json`. If it predates a newly added file, `clangd`
falls back to a default command and reports nonsense, such as missing
standard headers or "no member named `None`". Regenerate it with
`./scripts/create_compdb.py`, which only takes a few seconds.
+1 -4
View File
@@ -196,10 +196,7 @@ def main() -> None:
bazel, args.alsologtostderr, args.dump_files, args.extra_bazel_flag
)
print(
"Generating compile_commands.json (may take a few minutes)...",
flush=True,
)
print("Generating compile_commands.json...", flush=True)
subprocess.run(
[
bazel,