Correctly format wrapped function call parameters in templated functions.
This fixes llvm.org/PR14846.
Before:
template <typename T>
void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
int aaaaaaaaaaaaaaaaa);
After:
template <typename T>
void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
int aaaaaaaaaaaaaaaaa);
llvm-svn: 171963
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index e5e59f4..fbcb228 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -315,7 +315,7 @@
WhitespaceStartColumn);
}
- State.LastSpace[ParenLevel] = State.Indent[ParenLevel];
+ State.LastSpace[ParenLevel] = State.Column;
if (Current.is(tok::colon) && CurrentLineType != LT_ObjCMethodDecl &&
State.NextToken->Type != TT_ConditionalExpr)
State.Indent[ParenLevel] += 2;