]> granicus.if.org Git - clang/commit
[clang-format] Add support of consecutive declarations alignment
authorDaniel Jasper <djasper@google.com>
Thu, 1 Oct 2015 10:06:54 +0000 (10:06 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 1 Oct 2015 10:06:54 +0000 (10:06 +0000)
commitd5adefdf2dcf4a692caf20a8f2709a813ecfc07e
tree133c149aa78652bf7f15a3f4d5b97daac4763bf6
parent75852887564bd9ef339d719881ef928f724f2cf2
[clang-format] Add support of consecutive declarations alignment

This allows clang-format to align identifiers in consecutive
declarations. This is useful for increasing the readability of the code
in the same way the alignment of assignations is.

The code is a slightly modified version of the consecutive assignment
alignment code. Currently only the identifiers are aligned, and there is
no support of alignment of the pointer star or reference symbol.

The patch also solve the issue of alignments not being possible due to
the ColumnLimit for both the existing AlignConsecutiveAligments and the
new AlignConsecutiveDeclarations.

Patch by Beren Minor, thank you.

Review: http://reviews.llvm.org/D12362

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248999 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Format/Format.h
lib/Format/Format.cpp
lib/Format/WhitespaceManager.cpp
lib/Format/WhitespaceManager.h
unittests/Format/FormatTest.cpp