From cc7bf7fda1303f2b9bbbaf1f5d79a885af25ff97 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Thu, 3 Apr 2014 09:00:49 +0000 Subject: clang-format: Understand that "auto" is a type. Before: MACRO(auto * a); After: MACRO(auto *a); llvm-svn: 205517 --- clang/unittests/Format/FormatTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 62ca9ffcc39..5395fd98923 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -4554,6 +4554,12 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyFormat("foo();"); verifyFormat("foo();"); + verifyIndependentOfContext("MACRO(int *i);"); + verifyIndependentOfContext("MACRO(auto *a);"); + verifyIndependentOfContext("MACRO(const A *a);"); + // FIXME: Is there a way to make this work? + // verifyIndependentOfContext("MACRO(A *a);"); + // FIXME: We cannot handle this case yet; we might be able to figure out that // foo d > v; doesn't make sense. verifyFormat("foo d > v;"); -- cgit v1.2.3