]> granicus.if.org Git - clang/commit
clang-format: Revamp nested block formatting.
authorDaniel Jasper <djasper@google.com>
Fri, 12 Dec 2014 09:40:58 +0000 (09:40 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 12 Dec 2014 09:40:58 +0000 (09:40 +0000)
commit5ec4a06c79412a4462f76d5edd369df0e0dff8c0
tree8197d1036b6f8b3d7dca34e646d6de302e82ccbf
parent18e77997e548c6243ac784c764b672411107e4cf
clang-format: Revamp nested block formatting.

This fixed llvm.org/PR21804 and hopefully a few other strange cases.

Before:
    if (blah_blah(whatever, whatever, [] {
      doo_dah();
      doo_dah();
    })) {
    }
    }

After:
    if (blah_blah(whatever, whatever, [] {
          doo_dah();
          doo_dah();
        })) {
    }
    }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224112 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/ContinuationIndenter.cpp
lib/Format/ContinuationIndenter.h
lib/Format/FormatToken.h
lib/Format/UnwrappedLineFormatter.cpp
unittests/Format/FormatTest.cpp
unittests/Format/FormatTestJS.cpp