Skip to content
Snippets Groups Projects
  • Daniel Jasper's avatar
    ecff61e5
    clang-format: Make it very slighly more expensive to wrap between "= {". · ecff61e5
    Daniel Jasper authored
    This prevents unwanted fallout from r296664. Specifically in proto formatting,
    this changed:
      optional Aaaaaaaa aaaaaaaa = 12 [
        (aaa) = aaaa,
        (bbbbbbbbbbbbbbbbbbbbbbbbbb) = {
          aaaaaaaaaaaaaaaaa: true,
          aaaaaaaaaaaaaaaa: true
        }
      ];
    
    Into:
      optional Aaaaaaaa aaaaaaaa = 12 [
        (aaa) = aaaa,
        (bbbbbbbbbbbbbbbbbbbbbbbbbb) =
            {aaaaaaaaaaaaaaaaa: true, aaaaaaaaaaaaaaaa: true}
      ];
    
    Which is considered less readable. Generally, it seems preferable to
    format such dict literals as blocks rather than contract them to one
    line.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297696 91177308-0d34-0410-b5e6-96231b3b80d8
    ecff61e5
    History
    clang-format: Make it very slighly more expensive to wrap between "= {".
    Daniel Jasper authored
    This prevents unwanted fallout from r296664. Specifically in proto formatting,
    this changed:
      optional Aaaaaaaa aaaaaaaa = 12 [
        (aaa) = aaaa,
        (bbbbbbbbbbbbbbbbbbbbbbbbbb) = {
          aaaaaaaaaaaaaaaaa: true,
          aaaaaaaaaaaaaaaa: true
        }
      ];
    
    Into:
      optional Aaaaaaaa aaaaaaaa = 12 [
        (aaa) = aaaa,
        (bbbbbbbbbbbbbbbbbbbbbbbbbb) =
            {aaaaaaaaaaaaaaaaa: true, aaaaaaaaaaaaaaaa: true}
      ];
    
    Which is considered less readable. Generally, it seems preferable to
    format such dict literals as blocks rather than contract them to one
    line.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297696 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.