[clang-format][NFCish] Alphabetical sort Format.(h|pp)
authorBjörn Schäpers <bjoern@hazardy.de>
Fri, 4 Nov 2022 11:38:06 +0000 (12:38 +0100)
committerBjörn Schäpers <bjoern@hazardy.de>
Tue, 8 Nov 2022 20:46:15 +0000 (21:46 +0100)
commit41a09a07ce4ddd1e97ce0430d1debe1dcc853890
treef87648f84faa3d5939e573576fe7de1b52cf0c96
parent2e30d326de4ba11a77d5ccd132c155ad72923c5e
[clang-format][NFCish] Alphabetical sort Format.(h|pp)

I've:
- Sorted the members of FormatStyle alphabetical. The enums and structs
  are kept close to the member.
- Sorted the yaml io functions, based on the type they operate on.
- Sorted the initializers in getLLVMStyle(), except that penalities are
  kept at the end.
- Sorted the io of FormatStyle, this changes the --dump-config behavior.
- Moved the deprecated options into the only input case, this also
  changes --dump-config, it does not put the not directly used options
  in the .clang-format anymore.
- Sorted the comparisons in operator==.
- Added WhiteSpaceMacros in operator==, I've not actively looked if all
  other members are compared.
- This showed flawed tests (or in my opinion a flawed io operation, but
  that is another discussion and change).

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