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

Aleksey Fefelov via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 13:36:42 PDT 2023


fefaleksey 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)

Actually yes, I had concern that the code being tested might work with digraphs but not with literal `[` characters, because `<:` has 2 symbols, but `[` is only one symbol. But maybe you are right and the probability is really low.
If you think that this is not necessary, then I think we can close the PR.

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


More information about the llvm-commits mailing list