aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/WhitespaceManager.cpp
diff options
context:
space:
mode:
authorHirofumi Nakamura <k.nakamura.hirofumi@gmail.com>2024-03-22 23:11:36 +0900
committerGitHub <noreply@github.com>2024-03-22 23:11:36 +0900
commite54af608160350baa7ae1b8069f916eb625beadd (patch)
tree9ac223d178014a1f23585798b1e8c10b6f3f8f3e /clang/lib/Format/WhitespaceManager.cpp
parentf82d0187a7e581d4f8f825021dbcb08e8eb37d61 (diff)
downloadllvm-e54af608160350baa7ae1b8069f916eb625beadd.zip
llvm-e54af608160350baa7ae1b8069f916eb625beadd.tar.gz
llvm-e54af608160350baa7ae1b8069f916eb625beadd.tar.bz2
[clang-format] Added AlignConsecutiveTableGenBreakingDAGArgColons option. (#86150)
The option to specify the style of alignment of the colons inside TableGen's DAGArg.
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
-rw-r--r--clang/lib/Format/WhitespaceManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp
index 753be25..fef85ab 100644
--- a/clang/lib/Format/WhitespaceManager.cpp
+++ b/clang/lib/Format/WhitespaceManager.cpp
@@ -112,6 +112,7 @@ const tooling::Replacements &WhitespaceManager::generateReplacements() {
alignConsecutiveBitFields();
alignConsecutiveAssignments();
if (Style.isTableGen()) {
+ alignConsecutiveTableGenBreakingDAGArgColons();
alignConsecutiveTableGenCondOperatorColons();
alignConsecutiveTableGenDefinitions();
}
@@ -981,6 +982,11 @@ void WhitespaceManager::alignConsecutiveShortCaseStatements() {
Changes);
}
+void WhitespaceManager::alignConsecutiveTableGenBreakingDAGArgColons() {
+ alignConsecutiveColons(Style.AlignConsecutiveTableGenBreakingDAGArgColons,
+ TT_TableGenDAGArgListColonToAlign);
+}
+
void WhitespaceManager::alignConsecutiveTableGenCondOperatorColons() {
alignConsecutiveColons(Style.AlignConsecutiveTableGenCondOperatorColons,
TT_TableGenCondOperatorColon);