Skip to content
Snippets Groups Projects
  • Daniel Jasper's avatar
    75557a85
    clang-format: Improve column layout. · 75557a85
    Daniel Jasper authored
    Specifically, calculate the deviation between the shortest and longest
    element (which is used to prevent excessive whitespace) per column, not
    overall. This automatically handles the corner cases of a single column
    and a single row so that the actualy implementation becomes simpler.
    
    Before:
      vector<int> x = {1,
                       aaaaaaaaaaaaaaaaaaaaaa,
                       2,
                       bbbbbbbbbbbbbbbbbbbbbb,
                       3,
                       cccccccccccccccccccccc};
    
    After:
      vector<int> x = {1, aaaaaaaaaaaaaaaaaaaaaa,
                       2, bbbbbbbbbbbbbbbbbbbbbb,
                       3, cccccccccccccccccccccc};
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236992 91177308-0d34-0410-b5e6-96231b3b80d8
    75557a85
    History
    clang-format: Improve column layout.
    Daniel Jasper authored
    Specifically, calculate the deviation between the shortest and longest
    element (which is used to prevent excessive whitespace) per column, not
    overall. This automatically handles the corner cases of a single column
    and a single row so that the actualy implementation becomes simpler.
    
    Before:
      vector<int> x = {1,
                       aaaaaaaaaaaaaaaaaaaaaa,
                       2,
                       bbbbbbbbbbbbbbbbbbbbbb,
                       3,
                       cccccccccccccccccccccc};
    
    After:
      vector<int> x = {1, aaaaaaaaaaaaaaaaaaaaaa,
                       2, bbbbbbbbbbbbbbbbbbbbbb,
                       3, cccccccccccccccccccccc};
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236992 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.