[clangd] Also mark output arguments of array subscript expressions
authorChristian Kandeler <christian.kandeler@qt.io>
Fri, 1 Jul 2022 08:43:23 +0000 (04:43 -0400)
committerNathan Ridge <zeratul976@hotmail.com>
Fri, 1 Jul 2022 08:45:20 +0000 (04:45 -0400)
commitac511fd4392d0f1fad3852378adf3c80738016b7
treec0fc4ac417a272f7c17ed859ac080d94d3367c03
parentdc34d8df4c48b3a8f474360970cae8a58e6c84f0
[clangd] Also mark output arguments of array subscript expressions

... with the "usedAsMutableReference" semantic token modifier.
It's quite unusual to declare the index parameter of a subscript
operator as a non-const reference type, but arguably that makes it even
more helpful to be aware of it when working with such code.

Reviewed By: nridge

Differential Revision: https://reviews.llvm.org/D128892
clang-tools-extra/clangd/SemanticHighlighting.cpp
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp