[PATCH] D137409: [clang-format][NFCish] Alphabetical sort Format.(h|pp)

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 4 04:49:04 PDT 2022


HazardyKnusperkeks created this revision.
HazardyKnusperkeks added reviewers: owenpan, MyDeveloperDay, rymiel, curdeius.
HazardyKnusperkeks added a project: clang-format.
Herald added a project: All.
HazardyKnusperkeks requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137409

Files:
  clang/include/clang/Format/Format.h
  clang/lib/Format/Format.cpp
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137409.473192.patch
Type: text/x-patch
Size: 130041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221104/ae77f873/attachment-0001.bin>


More information about the cfe-commits mailing list