aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/WhitespaceManager.cpp
diff options
context:
space:
mode:
authorBjörn Schäpers <bjoern@hazardy.de>2023-08-27 00:45:25 +0200
committerBjörn Schäpers <bjoern@hazardy.de>2023-08-29 21:59:44 +0200
commitca0aa533656ceb806d2744c38766f70c317f1053 (patch)
treed7b594c55d50f4e9b77a641091ebd91615076658 /clang/lib/Format/WhitespaceManager.cpp
parent8cf814e6bd70f67db9efd903cbf1887404360da8 (diff)
downloadllvm-ca0aa533656ceb806d2744c38766f70c317f1053.zip
llvm-ca0aa533656ceb806d2744c38766f70c317f1053.tar.gz
llvm-ca0aa533656ceb806d2744c38766f70c317f1053.tar.bz2
[clang-format] Handle Template Arguments with AlignConsecutiveXX
This fixes https://github.com/llvm/llvm-project/issues/64928. Differential-Revision: https://reviews.llvm.org/D158945
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
-rw-r--r--clang/lib/Format/WhitespaceManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp
index 04048ae..6951c2a 100644
--- a/clang/lib/Format/WhitespaceManager.cpp
+++ b/clang/lib/Format/WhitespaceManager.cpp
@@ -425,6 +425,10 @@ AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End,
return true;
}
+ // Continued template parameter.
+ if (Changes[ScopeStart - 1].Tok->is(TT_TemplateOpener))
+ return true;
+
return false;
};