[clang-tools-extra] [clangd] Fix SIGSEGV crash when receiving a textDocument/didOpen request with the URI pointing to a directory (PR #177834)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 30 06:27:18 PST 2026


dhr412 wrote:

> As @vbvictor mentioned, we should add a test for this. We have [lit tests](https://llvm.org/docs/CommandGuide/lit.html) like [this](https://searchfox.org/llvm/source/clang-tools-extra/clangd/test/crash-parse.test) for this purpose, where you can provide clangd some LSP requests as input, and check that its output is what we expect (e.g. in this case, we could check for our log message).

Alright, I'll create a new test file for this?

https://github.com/llvm/llvm-project/pull/177834


More information about the cfe-commits mailing list