Closed yuyu5333 closed 1 month ago
VSCode report:
Clangd 10 was released in 2020, when clang's support for C++20 code such as std::ranges
was fairly unstable, so it's not surprising to see it crash.
Please try the latest version, clangd 18, from https://github.com/clangd/clangd/releases/tag/18.1.3.
Clangd 10 was released in 2020, when clang's support for C++20 code such as
std::ranges
was fairly unstable, so it's not surprising to see it crash.Please try the latest version, clangd 18, from https://github.com/clangd/clangd/releases/tag/18.1.3.
Thank you very much for your answer! ! ! Upgrading clang did solve the problem! ! ! In addition, what I am confused about is that if it is just because clang10 does not support it, then the expected reaction should be that the library reference cannot be found, rather than crashing directly. So is this a potential BUG of clang? If so, it may be better to fix it.
I agree with you that a crash is always a bug. However, since the crash has gone away in newer versions, the bug has already been fixed.
Description
Clangd crashes consistently in VSCode when trying to parse a file containing the following line of code:
This line is intended to count characters in a UTF-8 string, excluding continuation bytes. The crash occurs irrespective of the file's other contents.
If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).
Logs Please attach the clangd log from the "Output" window if you can. If possible, run with
--log=verbose
- note that the logs will include the contents of open files!System information Clangd version (from the log, or
clangd --version
): clangd version 10.0.0-4ubuntu1 clangd extension version: v0.1.28 Operating system: Ubuntu Linux 20.04