clang-format: Add ability to align assignment operators.
In Objective-C some style guides use a style where assignment operators are aligned, in an effort to increase code readability. This patch adds an option to the format library which allows this functionality. It is disabled by default for all the included styles, so it must be explicitly enabled. The option will change code such as: - (void)method { NSNumber *one = @1; NSNumber *twentyFive = @25; } to: - (void)method { NSNumber *one = @1; NSNumber *twentyFive = @25; } Patch by Matt Oakes. Thank you! Accidentally reformatted all the tests... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236100 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- docs/ClangFormatStyleOptions.rst 11 additions, 0 deletionsdocs/ClangFormatStyleOptions.rst
- include/clang/Format/Format.h 11 additions, 0 deletionsinclude/clang/Format/Format.h
- lib/Format/Format.cpp 2 additions, 0 deletionslib/Format/Format.cpp
- lib/Format/WhitespaceManager.cpp 91 additions, 0 deletionslib/Format/WhitespaceManager.cpp
- lib/Format/WhitespaceManager.h 7 additions, 0 deletionslib/Format/WhitespaceManager.h
- unittests/Format/FormatTest.cpp 457 additions, 332 deletionsunittests/Format/FormatTest.cpp
Loading
Please register or sign in to comment