[clang-format] Fix aligning of java-style declarations
authorDanil Sidoruk <patriotrossii2019@mail.ru>
Tue, 16 Aug 2022 03:26:56 +0000 (20:26 -0700)
committerowenca <owenpiano@gmail.com>
Tue, 16 Aug 2022 03:27:15 +0000 (20:27 -0700)
commitd8d331bc97103b6e191b96189166fefc6be54148
tree24eae96b40ce31cbe1c4a28e6c49506498498f5e
parentfbc4c26e9a7a315881b695e872682b84b7e2bcc4
[clang-format] Fix aligning of java-style declarations

- Modify TokenAnnotator to work fine with java-style array declarations.
- Add test for aligning of java declarations.

Fixes #55931.

Differential Revision: https://reviews.llvm.org/D129628
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestJava.cpp