From 99b5a4648cd02e88f9d3df15589ab5938a618cdd Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Tue, 12 May 2015 10:20:32 +0000 Subject: 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 --- clang/unittests/Format/FormatTest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/unittests/Format/FormatTest.cpp') 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();"); -- cgit v1.2.3