diff options
| author | Daniel Jasper <djasper@google.com> | 2015-05-27 05:37:40 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2015-05-27 05:37:40 +0000 |
| commit | 3e0dcc27d5eae976d1028f81813158c75a4b37a4 (patch) | |
| tree | 521fe62a116585b8d0f3f3b3c100a908250522b3 /clang/unittests/Format | |
| parent | 7c3bad52dd0bab7e4e9c14e4d21fff0b8d530a29 (diff) | |
| download | bcm5719-llvm-3e0dcc27d5eae976d1028f81813158c75a4b37a4.tar.gz bcm5719-llvm-3e0dcc27d5eae976d1028f81813158c75a4b37a4.zip | |
clang-format: [JS] Fix incorrect detection of ternary expressions.
A definintion like this could not be formatted at all:
constructor({aa}: {
aa?: string,
aaaaaaaa?: string,
aaaaaaaaaaaaaaa?: boolean,
aaaaaa?: List<string>
}) {
}
llvm-svn: 238291
Diffstat (limited to 'clang/unittests/Format')
| -rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index d5625a27976..a06daac24ec 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -753,6 +753,13 @@ TEST_F(FormatTestJS, OptionalTypes) { " y?(): z;\n" "}"); verifyFormat("x ? 1 : 2;"); + verifyFormat("constructor({aa}: {\n" + " aa?: string,\n" + " aaaaaaaa?: string,\n" + " aaaaaaaaaaaaaaa?: boolean,\n" + " aaaaaa?: List<string>\n" + "}) {\n" + "}"); } TEST_F(FormatTestJS, IndexSignature) { |

