summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-12-17 09:11:08 +0000
committerDaniel Jasper <djasper@google.com>2014-12-17 09:11:08 +0000
commit0580ff0ec6d0a37cea6edfde82391d1bb85470a8 (patch)
tree91db9877302e2592f05795905542b0bae6f9ac79 /clang/unittests/Format/FormatTestJS.cpp
parent028e966a54ecf79e8369970f034ce42e748523f3 (diff)
downloadbcm5719-llvm-0580ff0ec6d0a37cea6edfde82391d1bb85470a8.tar.gz
bcm5719-llvm-0580ff0ec6d0a37cea6edfde82391d1bb85470a8.zip
clang-format: Fix incorrect calculation of token lenghts.
This led, e.g. to break JavaScript regex literals too early. llvm-svn: 224419
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 1d12d32044a..780b02f746e 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -482,6 +482,8 @@ TEST_F(FormatTestJS, RegexLiteralLength) {
verifyFormat("var regex =\n"
" /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;",
getGoogleJSStyleWithColumns(60));
+ verifyFormat("var regex = /\\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;",
+ getGoogleJSStyleWithColumns(50));
}
TEST_F(FormatTestJS, RegexLiteralExamples) {
OpenPOWER on IntegriCloud