summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-11-01 06:23:05 +0000
committerDaniel Jasper <djasper@google.com>2016-11-01 06:23:05 +0000
commit3ade3be2a1e97fdac987638cf9470930f61f49d5 (patch)
treeb0b19b33e5294057bb8e371a8ab9608011535002 /clang/unittests/Format
parent71e50af675c12197ebaf8d2782e8a9a59c428e29 (diff)
downloadbcm5719-llvm-3ade3be2a1e97fdac987638cf9470930f61f49d5.tar.gz
bcm5719-llvm-3ade3be2a1e97fdac987638cf9470930f61f49d5.zip
clang-format: Fix incorrect binary operator detection.
Before: int x = f(* + [] {}); After: int x = f(*+[] {}); llvm-svn: 285671
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/FormatTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index b95a29f781c..8fe835e5793 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -10954,6 +10954,7 @@ TEST_F(FormatTest, FormatsLambdas) {
verifyFormat("int c = [&a, &a, a] { [=, a, b, &c] { return b++; }(); }();\n");
verifyFormat("auto c = {[&a, &a, a] { [=, a, b, &c] { return b++; }(); }}\n");
verifyFormat("auto c = {[&a, &a, a] { [=, a, b, &c] {}(); }}\n");
+ verifyFormat("int x = f(*+[] {});");
verifyFormat("void f() {\n"
" other(x.begin(), x.end(), [&](int, int) { return 1; });\n"
"}\n");
OpenPOWER on IntegriCloud