From 559b63cbb94e7027fe73df929d63703a1a3bc0c9 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Tue, 28 Jan 2014 20:13:43 +0000 Subject: clang-format: Understand __attribute__s preceding parameter lists. Before: ReturnType __attribute__((unused)) function(int i); After: ReturnType __attribute__((unused)) function(int i); This fixes llvm.org/PR18632. llvm-svn: 200337 --- clang/unittests/Format/FormatTest.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 1a197545754..efc563b4f25 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -4394,6 +4394,8 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { TEST_F(FormatTest, UnderstandsAttributes) { verifyFormat("SomeType s __attribute__((unused)) (InitValue);"); + verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa __attribute__((unused))\n" + "aaaaaaaaaaaaaaaaaaaaaaa(int i);"); } TEST_F(FormatTest, UnderstandsEllipsis) { -- cgit v1.2.3