This removes clangd's existing workaround in favor of proper support
via the newly added ObjCProtocolLoc. This improves support by
allowing clangd to properly identify which protocol is selected
now that ObjCProtocolLoc gets its own ASTNode.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LG, thanks!
You might want to check out how hover behaves and add a test there.
clang-tools-extra/clangd/unittests/FindTargetTests.cpp | ||
---|---|---|
948–949 | This new test case looks interesting, but can we keep the old one too? |
clang-tools-extra/clangd/unittests/FindTargetTests.cpp | ||
---|---|---|
948–949 | It now fails, I thought this was expected since the selection is now split up into multiple nodes - should it continue to work as it did previously? llvm-project/clang-tools-extra/clangd/unittests/FindTargetTests.cpp:953: Failure Value of: assertNodeAndPrintDecls("ObjCObjectTypeLoc") Expected: has 1 element and that element is equal to @protocol Foo Rel= Actual: {} @protocol Foo @end void test([[id<Foo>]] p); |
clang-tools-extra/clangd/unittests/FindTargetTests.cpp | ||
---|---|---|
948–949 | Oops, I wasn't reading carefully enough, you're right! |
clang-format: please reformat the code