[PATCH] D119366: [clangd] Use `ObjCProtocolLoc` for generalized ObjC protocol support

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 10 13:45:18 PST 2022


dgoldman added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:948
 
   Code = R"cpp(
+    void test(id</*error-ok*/[[InvalidProtocol]]> p);
----------------
sammccall wrote:
> This new test case looks interesting, but can we keep the old one too?
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);
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119366/new/

https://reviews.llvm.org/D119366



More information about the cfe-commits mailing list