[clang-tools-extra] [clangd] Fix crash on completion with out-of-range position (PR #196112)
Krzysztof Jędruczyk via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 09:55:55 PDT 2026
kjedruczyk wrote:
It does get printed later at E level (we let it get re-checked https://github.com/llvm/llvm-project/blob/0e6d57648584c3895abd3021fb8fa2a767146d5a/clang-tools-extra/clangd/CodeComplete.cpp#L2307-L2311)
Here's the output of the patched version when this issue is triggered:
```
I[17:38:38.534] <-- textDocument/completion(1)
V[17:38:38.534] could not convert position '97:0' to offset for file '/tmp/test.cpp'
E[17:38:38.534] Code completion position was invalid Line value is out of range (97)
I[17:38:38.534] --> reply:textDocument/completion(1) 0 ms
```
https://github.com/llvm/llvm-project/pull/196112
More information about the cfe-commits
mailing list