diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-02 07:54:58 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-02 07:54:58 +0000 |
commit | d22190632cf9eac4d1462596865f4de743df1d6a (patch) | |
tree | 0d2deb630f2c15ea5129b11c2df14da68d038ac7 /clang/unittests/Format/FormatTestJS.cpp | |
parent | cfcac9f64a8ee9780ebe4c5492120ab19c103d80 (diff) | |
download | bcm5719-llvm-d22190632cf9eac4d1462596865f4de743df1d6a.tar.gz bcm5719-llvm-d22190632cf9eac4d1462596865f4de743df1d6a.zip |
clang-format: [JS] Fix templated parameter default values.
Parameters can have templated types and default values (= ...), which is
another location in which a template closer should be followed by
whitespace.
Patch by Martin Probst, thank you.
llvm-svn: 236382
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 695bad55538..e0719ee4fc2 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -687,6 +687,8 @@ TEST_F(FormatTestJS, TypeArguments) { verifyFormat("foo<Y>(a);"); verifyFormat("var x: X<Y>[];"); verifyFormat("class C extends D<E> implements F<G>, H<I> {}"); + verifyFormat("function f(a: List<any> = null) {\n}"); + verifyFormat("function f(): List<any> {\n}"); } TEST_F(FormatTestJS, OptionalTypes) { |