diff options
author | Daniel Jasper <djasper@google.com> | 2016-01-14 05:37:52 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-01-14 05:37:52 +0000 |
commit | 11a876533ee63969493b324d5143bca7adfb198f (patch) | |
tree | e7ded1e56bd5e7969f5c1a8e6ef1eb92da43416a /clang/unittests/Format | |
parent | c040ad5fde6fb43d256c36d2c1e7bbe0014f6758 (diff) | |
download | bcm5719-llvm-11a876533ee63969493b324d5143bca7adfb198f.tar.gz bcm5719-llvm-11a876533ee63969493b324d5143bca7adfb198f.zip |
clang-format: [JS] Fix incorrect line break leading to semicolon insertion.
clang-format only works for JavaScript code, if all the semicolons are
present anyway, so this linebreak can never be desired.
Before (with appropriate statement lengths or column limit):
return
[ aaa ];
After:
return [
aaaa
];
llvm-svn: 257741
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 0e0f64a31ac..38fa5cd2b5b 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -591,6 +591,10 @@ TEST_F(FormatTestJS, AutomaticSemicolonInsertion) { verifyFormat("throw aaaaa;", getGoogleJSStyleWithColumns(10)); verifyFormat("aaaaaaaaa++;", getGoogleJSStyleWithColumns(10)); verifyFormat("aaaaaaaaa--;", getGoogleJSStyleWithColumns(10)); + verifyFormat("return [\n" + " aaa\n" + "];", + getGoogleJSStyleWithColumns(12)); } TEST_F(FormatTestJS, ClosureStyleCasts) { |