New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Objective-C++ Code triggers assertion failure #365
Comments
could you provide the content of just curious, you are running the clangd unittest, are you developing clangd? I think most clangd users just use clangd in an editor with a LSP plugin. |
I also just a user of clangd and I just wanted to narrow down this issue. This is the first time for me to opening the LLVM/clang source code. objc.test:
|
I see, thanks for offering the help! The lit test might not mirror the real environment where you encountered the crash, I think the common practice for normal clangd users (if you see a crash) is gathering clangd stderr outputs in your editor, see https://clangd.llvm.org/troubleshooting.html#gathering-logs btw, I didn't reproduce the crash with the above code on mac (with clangd 10), what I did:
|
The original crash occurred from much complex code so I was trying to simplify code as much as I can. After that, I've tested three cases:
1 and 2 have several custom options, most notably, assertions are enabled:
From my tests using clangd plugin of VS Code, 1 and 2 (My builds) have triggered an assertion whereas 3 does not trigger any issue. It is weird. I'll do retest using homebrew's build with original codes but it will take some time. The log of test 2:
|
Thanks for the details, I can reproduce the crash at HEAD, https://reviews.llvm.org/D79576 is a fix.
yeah, I think the clangd 10 binary from homebrew is not built with assertion enabled, so it won't trigger the crash. |
…extension. Summary: Similar to property, we print the containing interface decl as the nested name specifier for ivar; otherwise we will get "::ivar_name". this would fix an assertion crash in clangd: clangd/clangd#365 Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79576
…extension. Summary: Similar to property, we print the containing interface decl as the nested name specifier for ivar; otherwise we will get "::ivar_name". this would fix an assertion crash in clangd: clangd/clangd#365 Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79576
…extension. Summary: Similar to property, we print the containing interface decl as the nested name specifier for ivar; otherwise we will get "::ivar_name". this would fix an assertion crash in clangd: clangd/clangd#365 Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79576
…extension. Summary: Similar to property, we print the containing interface decl as the nested name specifier for ivar; otherwise we will get "::ivar_name". this would fix an assertion crash in clangd: clangd/clangd#365 Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79576
Consider this Objective-C++ Code:
Logs
System information
Revision(git rev-parse --short HEAD): e737847b8fc
Operating system: MacOS 10.15
The text was updated successfully, but these errors were encountered: