[clang-tools-extra] [wip][clangd] Introduce --skip-preamble-build command line option (PR #189284)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 30 00:52:27 PDT 2026


ChuanqiXu9 wrote:

The simplest example can't work


<img width="1896" height="570" alt="image" src="https://github.com/user-attachments/assets/7e6d9dc0-3751-4803-828b-3a219f0b4ccc" />

```
[
  {
    "directory": "/disk2/workspace.xuchuanqi/llvm-project-for-work/llvm-project-for-work/build/clangd_example",
    "file": "m.cppm",
    "command": "clang++ -std=c++20 -c m.cppm"
  }
]
```

> With this patch preamble is empty, in general it doesn't matter can it be reused it or not, because all includes are in the file body and not a part of preamble.

The question is, when the included header changes, how can clangd detect that?

https://github.com/llvm/llvm-project/pull/189284


More information about the cfe-commits mailing list