summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-09-04 15:03:34 +0000
committerDaniel Jasper <djasper@google.com>2014-09-04 15:03:34 +0000
commit8f2e94c8ab87a140c32896b4e67356f89ba347fb (patch)
tree22dc3dc27eac566d2515ceb6c1cbe186b88bbf5c /clang/unittests
parent94e11d02d88ea33c3212d3dab3dc0245509c8fe5 (diff)
downloadbcm5719-llvm-8f2e94c8ab87a140c32896b4e67356f89ba347fb.tar.gz
bcm5719-llvm-8f2e94c8ab87a140c32896b4e67356f89ba347fb.zip
clang-format: [JS] Supprot "catch" as function name.
Before: someObject.catch (); After: someObject.catch(); llvm-svn: 217158
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 4b0d1e77bd7..5bb1a3850c8 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -254,6 +254,9 @@ TEST_F(FormatTestJS, TryCatch) {
"} finally {\n"
" h();\n"
"}");
+
+ // But, of course, "catch" is a perfectly fine function name in JavaScript.
+ verifyFormat("someObject.catch();");
}
TEST_F(FormatTestJS, StringLiteralConcatenation) {
OpenPOWER on IntegriCloud