.clangd 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # clangd now reads a REAL native build: build-host/compile_commands.json, which
  2. # covers src/, tests/ and runner/ including runner/src/main.cpp. Generate it
  3. # with scripts/host-build.sh.
  4. CompileFlags:
  5. CompilationDatabase: build-host
  6. Add:
  7. # clangd defaults to its own driver; the build uses clang++ 21, and these
  8. # keep the diagnostics the compiler would actually give.
  9. - -Wall
  10. - -Wextra
  11. Remove:
  12. # Emitted by the generated protos' build flags and meaningless to the
  13. # indexer, which parses rather than codegens.
  14. - -fno-canonical-system-headers
  15. Diagnostics:
  16. UnusedIncludes: Strict
  17. MissingIncludes: Strict
  18. ClangTidy:
  19. # Narrow on purpose. The checks here are the ones that catch real bugs in
  20. # this codebase; the broad modernize/readability families would bury them
  21. # under thousands of style notes on 20k lines of existing code.
  22. Add:
  23. - bugprone-*
  24. - cert-*
  25. - clang-analyzer-*
  26. - misc-*
  27. - performance-*
  28. Remove:
  29. # Handlers legitimately take JSON by value and move it onward.
  30. - performance-unnecessary-value-param
  31. # Fires on every GoogleTest macro.
  32. - misc-use-anonymous-namespace
  33. # Our ApiError-throwing handlers are not noexcept candidates.
  34. - bugprone-exception-escape
  35. # std::rand is not used for anything security-relevant in tests.
  36. - cert-msc30-c
  37. - cert-msc50-cpp
  38. # Deliberate: see the include-what-you-use note above.
  39. - misc-include-cleaner
  40. InlayHints:
  41. Enabled: true
  42. ParameterNames: true
  43. DeducedTypes: true
  44. Hover:
  45. ShowAKA: true