Nathan Ridge
Nathan Ridge
> So, it'd be nice if all clang tooling ignored `-fno-canonical-system-headers` across the board. If this isn't the right place to file such an issue, let me know where I...
I cannot reproduce this in vscode. I tried the following * Created a file named `main.cpp`, with the content: ```c++ #include int main() { int j = 88, k =...
Would you mind showing the entry for `test.cc` from `compile_commands.json` itself? (This just makes it a bit easier for me to reproduce, as then I can use the flags from...
Thanks. `-fopenmp` seems to be the important flag that affects clangd's behaviour here.
Taking a simplified example: ```c++ int main() { int k = 0; #pragma omp parallel for for (int i = 0; i < 10; i++) { ++k; } } ```...
I agree that there is a clangd bug here, it doesn't seem to handle the constructs in the second AST (e.g. `OMPParallelForDirective` properly). That said, I'm curious if simply getting...
> I have a suggestion that might help make supporting OpenMP code eas_ier_. > > **In Summary: Disable the `-fopenmp` compiler flag while generating the AST in clangd** That's exactly...
If you can get your hands on a version of clangd with assertions enabled, it might be interesting to see if [this assertion](https://searchfox.org/llvm/rev/cb133a4629a56f8c8a67fb7549356839917b52f9/clang/include/clang/Basic/SourceManager.h#493) is firing before the crash. Regardless, it...
I can reproduce this. The hang is in [`SelectionVisitor::claimRange()`](https://searchfox.org/llvm/rev/c7c912cff945033918367c4a37121dfc09b9759e/clang-tools-extra/clangd/Selection.cpp#966), invoked during `textDocument/codeAction`.
This looks like it's probably the same crash that was reported in https://github.com/llvm/llvm-project/issues/76667, and should therefore be fixed by the hardening being pursued in that issue.