[Clang-Format] Add ReferenceAlignment directive
authorSeraphime Kirkovski <skirkovski@vmware.com>
Thu, 24 Jun 2021 19:24:59 +0000 (21:24 +0200)
committerBjörn Schäpers <bjoern@hazardy.de>
Thu, 24 Jun 2021 20:27:45 +0000 (22:27 +0200)
commita08fa8a508199c6463f5ee5d617e2f360f718067
treeebc54fc29cbfe846665c30e14ff77227a0278a9d
parent0464586ac515e8cfebe4c7615387fd625c8869f5
[Clang-Format] Add ReferenceAlignment directive

This introduces ReferenceAlignment style option modeled around
PointerAlignment.
Style implementors can specify Left, Right, Middle or Pointer to
follow whatever the PointerAlignment option specifies.

Differential Revision: https://reviews.llvm.org/D104096
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
clang/lib/Format/Format.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/lib/Format/TokenAnnotator.h
clang/unittests/Format/FormatTest.cpp