diff options
| author | Martin Probst <martin@probst.io> | 2016-06-09 22:49:04 +0000 |
|---|---|---|
| committer | Martin Probst <martin@probst.io> | 2016-06-09 22:49:04 +0000 |
| commit | 2ec2324f3c70abd722eced1df41d7257143164ac (patch) | |
| tree | ca581ab1828d429f7c4e7f6d351a449786491f98 /clang/unittests/Format/FormatTestJS.cpp | |
| parent | 4acea0aa2276111142e43e601b88f68ed8107570 (diff) | |
| download | bcm5719-llvm-2ec2324f3c70abd722eced1df41d7257143164ac.tar.gz bcm5719-llvm-2ec2324f3c70abd722eced1df41d7257143164ac.zip | |
clang-format: [JS] recognized named functions in AnnotatingParser.
Summary: This also fixes union type formatting in function parameter types.
Before: function x(path: number| string) {}
After: function x(path: number|string) {}
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D21206
llvm-svn: 272330
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index f646b82c213..3d9677922cf 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -903,6 +903,8 @@ TEST_F(FormatTestJS, UnionIntersectionTypes) { verifyFormat("let x: Foo<A|B> = new Foo<A|B>();"); verifyFormat("function(x: A|B): C&D {}"); verifyFormat("function(x: A|B = A | B): C&D {}"); + verifyFormat("function x(path: number|string) {}"); + verifyFormat("function x(): string|number {}"); } TEST_F(FormatTestJS, ClassDeclarations) { |

