Skip to content

Commit 1ff91a7

Browse files
authored
📝 Set correct clangd query-driver regex (#70)
clangd will use the query-driver to request system includes from g++. Having clangd do this for clang is problematic because it ends up adding additional system includes which disrupt and break the analysis. To solve this, we a query-driver that only activates for g++ and other gcc C++ compiler names such as arm-none-eabi-g++. To support these we can use this query driver argument: For Linux/Mac: `--query-driver=**/g++,**/*-g++` For Windows: `--query-driver=**/g++.exe,**/*-g++.exe`
1 parent 69fb876 commit 1ff91a7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mkdocs/user_guide/setup_vscode.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ should also work for non-vscode users as well.
2727
1. Ubuntu/Debian: `sudo apt install clang`
2828
2. MacOS: `brew install llvm@18`
2929
3. Windows: `choco install llvm`
30-
6. Add `--query-driver=**/*g++` (for Linux & Mac) or
31-
`--query-driver=**/*g++.exe` (for Windows) to the clangd command arguments
32-
in the clangd settings.
30+
6. Add `--query-driver=**/g++,**/*-g++` (for Linux & Mac) or
31+
`--query-driver=**/g++.exe,**/*-g++.exe` (for Windows) to the clangd command
32+
arguments in the `clangd` settings.
3333
1. Go the the extensions page
3434
2. Find clangd and press the GEAR icon and open up settings.
3535
3. Find the settings `clangd: Arguments` and add the above code there. It is

0 commit comments

Comments
 (0)