[clang-tools-extra] [clangd] fix wrong resouce-dir (PR #203332)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 13 03:04:38 PDT 2026


HighCommander4 wrote:

Or, if you prefer the config file over command line options, here is a way to override the resource using existing config options:

```yaml
CompileFlags:
  Add: [-resource-dir=/usr/local/llvm22/lib/clang/22]
```

(This works because the auto-detected resource dir is [only used](https://searchfox.org/llvm/rev/8f069e7aea7dbf35d87c8a7a700ae6871b831298/clang-tools-extra/clangd/CompileCommands.cpp#344-345) if an explicit `-resource-dir` option is not found in the compile command, and the above config fragment adds an explicit option to the compile command.)

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


More information about the cfe-commits mailing list