=?utf-8?b?5YWo5Y2T?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


quanzhuo wrote:

Hi @HighCommander4 

Thanks for the review! I've added the test for selecting `AttributedTypeLoc`, 
when the cursor is on the attribute. However, I'm having trouble with the 
second test case I added. It's failing with a range mismatch:

```
D:\repos\llvm-project\clang-tools-extra\clangd\unittests\SelectionTests.cpp:635
Expected equality of these values:
  nodeRange(T.commonAncestor(), AST)
    Which is: 0:17-0:57
  Test.range()
    Which is: 0:17-0:60
struct X { const [[int* Foo() const <:[clang::life^timebound]:>]] {return 
nullptr;}; };
 TranslationUnitDecl
   CXXRecordDecl struct X {}
     CXXMethodDecl const int *Foo() const
      .AttributedTypeLoc const int *() const [[clang::lifetimebound]]
```

The issue appears to be that the test annotation parser stops at the `]` in 
`]:>`, which truncates the expected range marker.

Thanks for your guidance!


https://github.com/llvm/llvm-project/pull/163926
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to