clang-format: [JS] Understand line breaks in concatenated strings.
authorDaniel Jasper <djasper@google.com>
Thu, 22 May 2014 09:10:04 +0000 (09:10 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 22 May 2014 09:10:04 +0000 (09:10 +0000)
commit49802ef93b56cd6dea2ec50262becdd5c01304f3
tree8ec417afba6c746d6c7915e78e1f425f3c8e60a9
parent3948516a03ba3405e2578d27fcaf898e58dc88b5
clang-format: [JS] Understand line breaks in concatenated strings.

Before:
  var literal = 'hello ' + 'world';

After:
  var literal = 'hello ' +
                'world';

There is no reason to concatenated two string literals with a '+' unless
the line break is intended.

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