llvm-project/clang/lib/Format
Daniel Jasper b10cbc45ad Add experimental flag for adaptive parameter bin-packing.
This is not activated for any style, might change or go away
completely.

For those that want to play around with it, set
ExperimentalAutoDetectBinPacking to true.

clang-format will then:
Look at whether function calls/declarations/definitions are currently
formatted with one parameter per line (on a case-by-case basis). If so,
clang-format will avoid bin-packing the parameters. If all parameters
are on one line (thus that line is "inconclusive"), clang-format will
make the choice dependent on whether there are other bin-packed
calls/declarations in the same file.

The reason for this change is that bin-packing in some situations can be
really bad and an author might opt to put one parameter on each line. If
the author does that, he might want clang-format not to mess with that.
If the author is unhappy with the one-per-line formatting, clang-format
can easily be convinced to bin-pack by putting any two parameters on the
same line.

llvm-svn: 186003
2013-07-10 14:02:49 +00:00
..
BreakableToken.cpp Reformat clang-format's source files after r185822 and others. 2013-07-08 14:34:09 +00:00
BreakableToken.h Reformat clang-format's source files after r185822 and others. 2013-07-08 14:34:09 +00:00
CMakeLists.txt Unified token breaking logic for strings and block comments. 2013-04-15 14:28:00 +00:00
Encoding.h Reformat clang-format's source files after r185822 and others. 2013-07-08 14:34:09 +00:00
Format.cpp Add experimental flag for adaptive parameter bin-packing. 2013-07-10 14:02:49 +00:00
FormatToken.h Add experimental flag for adaptive parameter bin-packing. 2013-07-10 14:02:49 +00:00
Makefile
TokenAnnotator.cpp Add experimental flag for adaptive parameter bin-packing. 2013-07-10 14:02:49 +00:00
TokenAnnotator.h UTF-8 support for clang-format. 2013-06-05 14:09:10 +00:00
UnwrappedLineParser.cpp Fix alignment of closing brace in braced initializers. 2013-07-09 09:06:29 +00:00
UnwrappedLineParser.h Fix alignment of closing brace in braced initializers. 2013-07-09 09:06:29 +00:00
WhitespaceManager.cpp Reformat clang-format's source files after r185822 and others. 2013-07-08 14:34:09 +00:00
WhitespaceManager.h Reformat clang-format's source files after r185822 and others. 2013-07-08 14:34:09 +00:00