summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-11-09 14:12:55 +0000
committerDaniel Jasper <djasper@google.com>2016-11-09 14:12:55 +0000
commit8315ea16135fbc816214c6327a7db01216fa5e32 (patch)
tree9faa5be14b736bf9df36ab9fd59bf7274c8b0e55 /clang/unittests/Format/FormatTestJS.cpp
parent3dc342eb0c8bf5ba512a771add6d934b317c4941 (diff)
downloadbcm5719-llvm-8315ea16135fbc816214c6327a7db01216fa5e32.tar.gz
bcm5719-llvm-8315ea16135fbc816214c6327a7db01216fa5e32.zip
clang-format: [TypeScript] Fix bug in handling of non-null operator.
Before: var i = x!-1; After: var i = x! - 1; llvm-svn: 286367
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 f4b50591aae..764159882c2 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -1462,6 +1462,7 @@ TEST_F(FormatTestJS, NonNullAssertionOperator) {
verifyFormat("let x = !foo;\n");
verifyFormat("let x = foo[0]!;\n");
verifyFormat("let x = (foo)!;\n");
+ verifyFormat("let x = foo! - 1;\n");
verifyFormat("let x = {foo: 1}!;\n");
}
OpenPOWER on IntegriCloud