summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-07-02 13:20:45 +0000
committerDaniel Jasper <djasper@google.com>2015-07-02 13:20:45 +0000
commitc553ae13b556ab29121e10eae74f7ba66feca7df (patch)
treef24d137953b18d7d73edb84c4534f23f917c7651 /clang/unittests/Format/FormatTestJS.cpp
parenta525400d37cf2920479862acafedc83e2d7c5fb6 (diff)
downloadbcm5719-llvm-c553ae13b556ab29121e10eae74f7ba66feca7df.tar.gz
bcm5719-llvm-c553ae13b556ab29121e10eae74f7ba66feca7df.zip
clang-format: [JS] Support regex literals at the start of a file.
llvm-svn: 241259
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 845ae5124b2..83c21183dfd 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -579,6 +579,7 @@ TEST_F(FormatTestJS, RegexLiteralClassification) {
verifyFormat("var x = a && /abc/.test(y);");
verifyFormat("var x = a || /abc/.test(y);");
verifyFormat("var x = a + /abc/.search(y);");
+ verifyFormat("/abc/.search(y);");
verifyFormat("var regexs = {/abc/, /abc/};");
verifyFormat("return /abc/;");
OpenPOWER on IntegriCloud