From e4ab49e8d3cfd1556b61d4af79fede0e477ebfb0 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 20 Apr 2015 12:54:29 +0000 Subject: clang-format: Fix incorrect multi-var declstmt detection. This is now obvious as the pointer alignment behavior was changed. Before (even with pointer alignment "Left"): MACRO Constructor(const int &i) : a(a), b(b) {} After: MACRO Constructor(const int& i) : a(a), b(b) {} llvm-svn: 235301 --- 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 9791e2a5fb9..bec7a9cfb50 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5336,6 +5336,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyIndependentOfContext("int x = ~*p;"); verifyFormat("Constructor() : a(a), area(width * height) {}"); verifyFormat("Constructor() : a(a), area(a, width * height) {}"); + verifyGoogleFormat("MACRO Constructor(const int& i) : a(a), b(b) {}"); verifyFormat("void f() { f(a, c * d); }"); verifyIndependentOfContext("InvalidRegions[*R] = 0;"); -- cgit v1.2.3