summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-07-02 14:14:04 +0000
committerDaniel Jasper <djasper@google.com>2015-07-02 14:14:04 +0000
commitf737215288e5d63dd6564d63f69569266467f7ee (patch)
tree922f1f31e564a7973e311cfe6ed94455e49d72cb /clang/unittests/Format/FormatTestJS.cpp
parent8f4699a8c6f5c95ac294d83fcc84e394082b3733 (diff)
downloadbcm5719-llvm-f737215288e5d63dd6564d63f69569266467f7ee.tar.gz
bcm5719-llvm-f737215288e5d63dd6564d63f69569266467f7ee.zip
clang-format: [JS] Skip comments when applying the regex-literal heuristic
llvm-svn: 241264
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 40a2a1ffe63..ef5901e8d69 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -636,6 +636,8 @@ TEST_F(FormatTestJS, RegexLiteralSpecialCharacters) {
verifyFormat("var regex =\n"
" /\"/;",
getGoogleJSStyleWithColumns(15));
+ verifyFormat("var regex = //\n"
+ " /a/;");
}
TEST_F(FormatTestJS, RegexLiteralModifiers) {
OpenPOWER on IntegriCloud