clang-format: Add ability to align assignment operators.
authorDaniel Jasper <djasper@google.com>
Wed, 29 Apr 2015 13:06:49 +0000 (13:06 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 29 Apr 2015 13:06:49 +0000 (13:06 +0000)
commita4499133b124cc3026c0ca33e7b8ead1b5c1d723
tree232530fa6da9fd78fb6af1c057ddf19e4ca827c5
parent301f93776534b8a97b158b5f9de0865379ba2346
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...

llvm-svn: 236100
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
clang/lib/Format/Format.cpp
clang/lib/Format/WhitespaceManager.cpp
clang/lib/Format/WhitespaceManager.h
clang/unittests/Format/FormatTest.cpp