]> granicus.if.org Git - clang/commit
Reduce penalty for splitting after "{" in static initializers.
authorDaniel Jasper <djasper@google.com>
Thu, 28 Feb 2013 15:04:12 +0000 (15:04 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 28 Feb 2013 15:04:12 +0000 (15:04 +0000)
commit25e81b255cea00fe633f2822c1d1d708ef871a59
tree68059398682e9b34cf90e9f09e44aa845b3ab6c8
parent8ed4100410ea055a03be5ec4a92a947a0ee664cd
Reduce penalty for splitting after "{" in static initializers.

This fixes llvm.org/PR15379.

Before:
const uint8_t aaaaaaaaaaaaaaaaaaaaaa[0] = { 0x00, 0x00, 0x00, 0x00, 0x00,
                                            0x00,                  // comment
                                            0x00, 0x00, 0x00, 0x00, 0x00,
                                            0x00,                  // comment
                                            0x00, 0x00, 0x00, 0x00 // comment
};

After:
const uint8_t aaaaaaaaaaaaaaaaaaaaaa[0] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // comment
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // comment
  0x00, 0x00, 0x00, 0x00              // comment
};

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176262 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp