Skip to content
Snippets Groups Projects
  • Daniel Jasper's avatar
    a4974cf6
    Penalize tokens with a lower parenthesis level than the start of the line. · a4974cf6
    Daniel Jasper authored
    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();
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171038 91177308-0d34-0410-b5e6-96231b3b80d8
    a4974cf6
    History
    Penalize tokens with a lower parenthesis level than the start of the line.
    Daniel Jasper authored
    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();
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171038 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.