summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-09-05 08:42:27 +0000
committerDaniel Jasper <djasper@google.com>2014-09-05 08:42:27 +0000
commit3f69ba107515e95a0f21affca5a5159b274d448a (patch)
treee9bf7e7a6601e65f316cdba802f8d1fba45a58fc /clang/unittests/Format/FormatTestJS.cpp
parent97bfb7b1ba5dfc5c0d71e8e9bea3e23e9666ba17 (diff)
downloadbcm5719-llvm-3f69ba107515e95a0f21affca5a5159b274d448a.tar.gz
bcm5719-llvm-3f69ba107515e95a0f21affca5a5159b274d448a.zip
clang-format: [JS] Better support for empty function literals.
Before: SomeFunction(function(){}); After: SomeFunction(function() {}); llvm-svn: 217236
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 55e7cc6fe19..a4bd84a3242 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -167,6 +167,7 @@ TEST_F(FormatTestJS, FormatsFreestandingFunctions) {
}
TEST_F(FormatTestJS, FunctionLiterals) {
+ verifyFormat("doFoo(function() {});");
verifyFormat("doFoo(function() { return 1; });");
verifyFormat("var func = function() { return 1; };");
verifyFormat("return {\n"
OpenPOWER on IntegriCloud