Skip to content
Commit 6d822720 authored by Daniel Jasper's avatar Daniel Jasper
Browse files

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
parent a6c2729c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment