clang-format: [JS] Making arrow function wrapping more consistent.
authorDaniel Jasper <djasper@google.com>
Mon, 1 Jun 2015 09:56:32 +0000 (09:56 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 1 Jun 2015 09:56:32 +0000 (09:56 +0000)
commit1699eca119e3488a21dfe50cbbfe8f1508b23eb3
treec8d947ef361f67c2d16a11b30ab48de60bd5b83e
parent0c41088ebfd9b9bc800d7f6d440733f22bb2d364
clang-format: [JS] Making arrow function wrapping more consistent.

Before:
  someFunction(() =>
               {
                 doSomething();  // break
               })
      .doSomethingElse(  // break
          );

After:
  someFunction(() => {
    doSomething();  // break
  })
      .doSomethingElse(  // break
          );

This is still bad, but at least it is consistent with what we do for other
function literals. Added corresponding tests.

llvm-svn: 238736
clang/lib/Format/ContinuationIndenter.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestJS.cpp