summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-12 10:20:32 +0000
committerDaniel Jasper <djasper@google.com>2015-05-12 10:20:32 +0000
commit99b5a4648cd02e88f9d3df15589ab5938a618cdd (patch)
treeee9d897fc95b717d5d9dd6ed90c6100115f22776 /clang/unittests/Format/FormatTest.cpp
parent5fc133e71e62090d72a631aa576ac85100a26772 (diff)
downloadbcm5719-llvm-99b5a4648cd02e88f9d3df15589ab5938a618cdd.tar.gz
bcm5719-llvm-99b5a4648cd02e88f9d3df15589ab5938a618cdd.zip
clang-format: Fix */& detection for lambdas in macros.
Before: #define MACRO() [](A * a) { return 1; } After: #define MACRO() [](A *a) { return 1; } llvm-svn: 237109
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-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 e6dee38fb08..4072fef2e0f 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5473,6 +5473,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyFormat("auto PointerBinding = [](const char *S) {};");
verifyFormat("typedef typeof(int(int, int)) *MyFunc;");
verifyFormat("[](const decltype(*a) &value) {}");
+ verifyFormat("#define MACRO() [](A *a) { return 1; }");
verifyIndependentOfContext("typedef void (*f)(int *a);");
verifyIndependentOfContext("int i{a * b};");
verifyIndependentOfContext("aaa && aaa->f();");
OpenPOWER on IntegriCloud