diff options
author | Daniel Jasper <djasper@google.com> | 2012-12-24 16:43:00 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2012-12-24 16:43:00 +0000 |
commit | 6d822720f0e4ee38ab558f12d12b193e775ba334 (patch) | |
tree | 3289a2453029264526cf785423f0efb7bd2edb27 /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | a6c2729ccc2b83072f1515b3e5b6d5191ee63a33 (diff) | |
download | bcm5719-llvm-6d822720f0e4ee38ab558f12d12b193e775ba334.tar.gz bcm5719-llvm-6d822720f0e4ee38ab558f12d12b193e775ba334.zip |
Penalize tokens with a lower parenthesis level than the start of the line.
This prevents formattings like this (assuming "parameter" doesn't fit the line):
bool f = someFunction() && someFunctionWithParam(
parameter) && someOtherFunction();
Here, "parameter" - the start of line 2 - has a parenthesis level of 2, but
there are subsequent tokens ("&&" and "someOtherFunction") with a lower level.
This is bad for readability as "parameter" hides "someOtherFunction". With this
patch, this changes to:
bool f = someFunction() &&
someFunctionWithParam(parameter) &&
someOtherFunction();
llvm-svn: 171038
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
0 files changed, 0 insertions, 0 deletions