[clang-format] Add TypeNames option to disambiguate types/objects
authorOwen Pan <owenpiano@gmail.com>
Fri, 14 Jul 2023 08:25:34 +0000 (01:25 -0700)
committerOwen Pan <owenpiano@gmail.com>
Tue, 18 Jul 2023 21:18:40 +0000 (14:18 -0700)
commit5c106f7b947e514852402ad5678c0ebf70ce91b1
tree173900800b3bf31e5486809a6761a82793443cab
parenta060102b3cb09d0710a58f783e18679858b3fdfc
[clang-format] Add TypeNames option to disambiguate types/objects

If a non-keyword identifier is found in TypeNames, then a *, &, or && that
follows it is annotated as TT_PointerOrReference.

Differential Revision: https://reviews.llvm.org/D155273
clang/docs/ClangFormatStyleOptions.rst
clang/docs/ReleaseNotes.rst
clang/include/clang/Format/Format.h
clang/lib/Format/Format.cpp
clang/lib/Format/FormatToken.h
clang/lib/Format/FormatTokenLexer.cpp
clang/lib/Format/FormatTokenLexer.h
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/TokenAnnotatorTest.cpp