Skip to content

Add contributor/developer documentation #120

Open
@HighCommander4

Description

@HighCommander4

It would be nice to have some documentation geared towards clangd contributors. I know we have some info at https://github.com/llvm/llvm-project/tree/main/clang-tools-extra/clangd, but I don't think that's as discoverable as a page on the website would be.

Some topics to cover beyond what's on the page linked above:

  • More details on clangd tests
    • The two types we have (lit tests and unit tests), and which one to use when
    • For lit tests, link to LLVM docs about lit and FileCheck
    • For unit tests:
      • How to run a single unit test with --gtest_filter
      • Some of the common utilities used in our tests, e.g. the Annotations class and its features
  • Debugging clangd
    • Recommend writing a unit test and debugging that
      • For Linux users, maybe suggest rr
    • The next best thing after debugging a unit test is debugging clangd --check
    • If you must debug a clangd instance connected to a client, techniques to do that:
      • Find the process id of clangd process started by the client, attach a debugger to it
      • Alternative for rr users: point your editor to a script that wraps clangd with rr record clangd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions