-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[19.1.0] clangd crashes while running boost-use-ranges clang-tidy check #109367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@xb284524239: Could you please try to run Clang-tidy standalone? Just to narrow down source of problem. |
@EugeneZelenko Hello, I usually use it via VSCode. Could you please tell me how to use Clang-tidy standalone? |
See https://clang.llvm.org/extra/clang-tidy/. There is also |
|
This comment was marked as outdated.
This comment was marked as outdated.
@EugeneZelenko After multiple tests, I have finally identified the cause of the Clang Language Server crashes. The specific reasons are as follows:
The only difference between the two configuration files is that the second one includes an additional By the way, my project is a very simple |
@llvm/issue-subscribers-clang-tidy Author: Paul Xu (xb284524239)
```
My Environment:
OS: Windows 10
Checks: "
|
@xb284524239: Please provide reproducer. https://godbolt.org should be helpful. |
Hello, here is my demo code, and I have recorded a video to reproduce the issue. In my video, there is only one check item in the
6ff8f55f853bc24005a656594593d8ac.mp4 |
Thank you @xb284524239 for the reduced code example. I can reproduce the crash using this example. The crash occurs when opening I have not been able to reproduce the crash with |
@llvm/issue-subscribers-clangd Author: Paul Xu (xb284524239)
```
My Environment:
OS: Windows 10
Checks: "
|
The reason for the crash is that To trigger the crash, it's sufficient to just open any two files in clangd with this checker enabled, even if the contents are empty, since each time a file is opened clangd will call into this function when registering the matchers for the checker. The function does get called once for each source file with |
…seRangesCheck Fixes llvm#109367
Proposed fix: #111282 |
…seRangesCheck (llvm#111282) Fixes llvm#109367 (cherry picked from commit acf92a4)
…seRangesCheck (llvm#111282) Fixes llvm#109367 (cherry picked from commit acf92a4)
@HighCommander4 Thank you for telling me the reason. |
Problem Description:
I have found after multiple attempts that when I configure the
.clang-tidy
file in the root directory of my project, the Clang Language Server frequently crashes to the point of being completely unusable. However, when I delete the.clang-tidy
file, everything returns to normal.The
.clang-tidy
file:The text was updated successfully, but these errors were encountered: