Closed auralioth closed 2 months ago
Sorry. This is my mistake. I have been using clang17 before. I didn't notice that FastCheckFilter was introduced after clang18. And performance-avoid-endl is not in the known list (https://clang.llvm.org/extra/clang-tidy/checks/list.html). I can adjust the FastCheckFilter to allow running.
System information
Clangd version: 18.1.3 clangd extension version: 0.1.28 Operating system: Windows 11 23H2 or Arch Linux
Reproduction
1. Install clangd
2. Demo
test.cpp:
auto main() -> int { std::cout << "Hello, World!" << std::endl; return 0; }
Expected
Under![image](https://github.com/clangd/vscode-clangd/assets/122893272/0884add8-9015-4aa9-a92f-99e4ac20ed31)
std::endl
, clang-tidy prompt you:Do not use 'std::endl' with streams; use '\n' instead (fix available)clang-tidy performance-avoid-endl
In fact
Nothing will report. clang-tidy not works.
Workaround
In Arch I can just use clang package with version 17.
In Windows I can install clangd 17 through the automatic installation by clangd extensiton. And then in the clangd config add:
But the annoying thing is it will add
clangd.path
to my vscode settings.json. I sync settings between Arch and Windows. So the path is not the same.Vscode now does not support scoping settings by platform according to issues 207760. So it is not that convenient.