diff --git a/config.md b/config.md index 1cd5437..8065401 100644 --- a/config.md +++ b/config.md @@ -147,6 +147,29 @@ flag parsing (clang vs clang-cl), target inference (gcc-arm-noneabi) etc. If the option matches a glob mentioned in `--query-driver`, then it'll be invoked for extraction of include paths. +### BuiltinHeaders +{:.v21} + +Controls whether Clangd should include its own built-in headers (like +stddef.h), or use the system header found from the query driver. + +Valid values are: +- `Clangd`: Use builtin headers from `clangd`. This is the default. +- `QueryDriver`: Use the headers extracted from the compiler via the + `--query-driver` command line argument. If a query driver is not supplied or + does not match the compiler, then the `Clangd` builtin headers will be the + fallback. + +```yaml +CompileFlags: + BuiltinHeaders: QueryDriver +``` + +**Note**: if the driver is not clang, `BuiltinHeaders: QueryDriver` will result +in the clang frontend (embedded in clangd) processing the builtin headers of +another compiler, which could lead to unexpected results such as false positive +diagnostics. + ## Index Controls how clangd understands code outside the current file. diff --git a/styles.css b/styles.css index 721cf2c..f47ffbd 100644 --- a/styles.css +++ b/styles.css @@ -170,7 +170,7 @@ a[href^="https://code.woboq.org/"] { /* Version marker ornaments */ .v6::before, .v7::before, .v8::before, .v9::before, .v10::before, .v11::before, .v12::before, .v13::before, .v14::before, .v15::before, .v16::before, .v17::before, .v18::before, .v19::before, -.v20::before { +.v20::before, .v21::before { color: #008; border-radius: 3px; padding: 0.2em 0.6em; @@ -197,6 +197,7 @@ a[href^="https://code.woboq.org/"] { .v18::before { content: "clangd-18"; } .v19::before { content: "clangd-19"; } .v20::before { content: "clangd-20"; } +.v21::before { content: "clangd-21"; } #edit { text-decoration: none; position: absolute;