Closed deeedob closed 1 month ago
It's the cppcoreguidelines-owning-memory
option that produces the crash
@llvm/issue-subscribers-clangd
Author: None (deeedob)
Could you please try 19 or main
branch?
Tried on:
clangd version 20.0.0git (https://github.com/llvm/llvm-project 5b41eb3a6dcd92711b4adf946e4d9d29c3886007) Features: linux+grpc Platform: x86_64-unknown-linux-gnu
still crashes
Can you also specify what standard library version are you using? (If unsure, perform go-to-def on <memory>
and post the full path of the opened file.)
libstdc++ 14.2.1, I thought it will take the llvm stl though. Clang is at least set as compiler. compile_commands.json is using clang though:
{
"directory": "/home/ddob/Coding/clangd_lambda_capture_cash/build/debug-clang",
"command": "/usr/bin/clang++ -Wall -Wextra -Wpedantic -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wuseless-cast -Wdouble-promotion -Wformat=2 --coverage -fPIC -g -O0 -std=gnu++23 -o CMakeFiles/cpp_preset.dir/main.cpp.o -c /home/ddob/Coding/clangd_lambda_capture_cash/main.cpp",
"file": "/home/ddob/Coding/clangd_lambda_capture_cash/main.cpp",
"output": "CMakeFiles/cpp_preset.dir/main.cpp.o"
}
I can reproduce this crash. It's not specific to clangd, it occurs when running clang-tidy --checks=cppcoreguidelines-owning-memory
on the command line as well.
@llvm/issue-subscribers-clang-tidy
Author: None (deeedob)
@llvm/issue-subscribers-clang-frontend
Author: None (deeedob)
Hey, this just happened to me on:
clangd --version clangd version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0) Features: linux+grpc Platform: x86_64-unknown-linux-gnu
I could boil it down to the following:
this code instantly crashes clangd with signal 11. It has to be something specifically about {unique, smart}_ptrs? no crash when capturing primitives at least...
Debug log + stack trace: