diff options
author | Daniel Jasper <djasper@google.com> | 2016-06-14 13:54:38 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-06-14 13:54:38 +0000 |
commit | 887a399418dba637d19e6aeec2071dfc03077583 (patch) | |
tree | a009b33b34c528426b1b8fea4e214187abe9d0e5 /clang/unittests | |
parent | c49f6ce3e163132ac28e1b3ec90bf4701d8ea65b (diff) | |
download | bcm5719-llvm-887a399418dba637d19e6aeec2071dfc03077583.tar.gz bcm5719-llvm-887a399418dba637d19e6aeec2071dfc03077583.zip |
clang-format: [JS] Fix failing format with TypeScript casts.
Before, this could be formatted at all (with BracketAlignmentStyle
AlwaysBreak):
foo = <Bar[]>[
1, /* */
2
];
llvm-svn: 272668
Diffstat (limited to 'clang/unittests')
-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 8410a0c9967..f71571c16a3 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -1205,6 +1205,10 @@ TEST_F(FormatTestJS, TemplateStrings) { TEST_F(FormatTestJS, CastSyntax) { verifyFormat("var x = <type>foo;"); verifyFormat("var x = foo as type;"); + verifyFormat("foo = <Bar[]>[\n" + " 1, //\n" + " 2\n" + "];"); } TEST_F(FormatTestJS, TypeArguments) { |