diff options
| author | Daniel Jasper <djasper@google.com> | 2014-01-28 20:13:43 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-01-28 20:13:43 +0000 |
| commit | 559b63cbb94e7027fe73df929d63703a1a3bc0c9 (patch) | |
| tree | dd642652efd641c3e614fc1d688f15e6a77d74d7 /clang/lib/Format/ContinuationIndenter.cpp | |
| parent | 5c65e7f345967189ca98f9ed88787d5487c77bb3 (diff) | |
| download | bcm5719-llvm-559b63cbb94e7027fe73df929d63703a1a3bc0c9.tar.gz bcm5719-llvm-559b63cbb94e7027fe73df929d63703a1a3bc0c9.zip | |
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
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
| -rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 && |

