Skip to content

Commit 3bb6d78

Browse files
committed
Revert "Stop recommending query driver by default due to clangd bugs"
This reverts commit 7d83741.
1 parent 0390730 commit 3bb6d78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ Then, open VSCode *user* settings, so things will be automatically set up for al
154154

155155
Search for "clangd".
156156

157-
Add the following (separate) entries to `"clangd.arguments"`:
157+
Add the following three separate entries to `"clangd.arguments"`:
158158
```Shell
159159
--header-insertion=never
160160
--compile-commands-dir=${workspaceFolder}/
161+
--query-driver=**
161162
```
162163
(Just copy each as written; VSCode will correctly expand `${workspaceFolder}` for each workspace.)
163-
- They get rid of (overzealous) header insertion and locate the compile commands correctly, even when browsing system headers outside the source tree.
164+
- They get rid of (overzealous) header insertion; locate the compile commands correctly, even when browsing system headers outside the source tree; and cause `clangd` to interrogate Bazel's compiler wrappers to figure out which system headers are included by default.
164165
- If your Bazel `WORKSPACE` is a subdirectory of your project, change `--compile-commands-dir` to point into that subdirectory by overriding *both* flags in your *workspace* settings
165-
- If later you discover that clangd isn't finding system headers correctly, try adding `--query-driver=**` to the above list of arguments. This causes `clangd` to interrogate Bazel's compiler wrappers more deeply to figure out which system headers are included by default. However, while it fixes some issues, it also causes others; Clangd has some bugs here, unfortunately. <!-- https://github.com/clangd/clangd/issues/1378 -->
166166

167167
<!-- At least until https://github.com/clangd/vscode-clangd/issues/138 is resolved. -->
168168
Turn on: Clangd: Check Updates

0 commit comments

Comments
 (0)