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/lib/Format/ContinuationIndenter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Format/ContinuationIndenter.cpp') diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index 30c066fedee..6db3ca98240 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -384,7 +384,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, } else if (Previous.is(tok::comma) && State.Stack.back().VariablePos != 0) { State.Column = State.Stack.back().VariablePos; } else if ((PreviousNonComment && - PreviousNonComment->ClosesTemplateDeclaration) || + (PreviousNonComment->ClosesTemplateDeclaration || + PreviousNonComment->Type == TT_AttributeParen)) || ((Current.Type == TT_StartOfName || Current.is(tok::kw_operator)) && State.ParenLevel == 0 && -- cgit v1.2.3