[llvm] [clangd] Support square bracket escaping in Annotations (PR #69379)

Sam McCall via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 13:23:25 PDT 2023


sam-mccall wrote:

> Yes, this works well, but in this case we will not be able to test the [[ ... ]] attributes.

Can you explain a bit further?
These can be spelled `[<: ... :>]` or `<:<: ... :>:>` in the code, which should have the same effect.

Code that moves attributes around would ideally not be too sensitive to the char-by-char spelling, as these are often hidden behind macros etc.

Is the concern that the code being tested might work with digraphs but not with literal `[` characters?
(It is unfortunate if a test isn't realistic, but this doesn't seem terribly likely)

https://github.com/llvm/llvm-project/pull/69379


More information about the llvm-commits mailing list