diff options
author | Hirofumi Nakamura <k.nakamura.hirofumi@gmail.com> | 2024-03-22 23:11:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 23:11:36 +0900 |
commit | e54af608160350baa7ae1b8069f916eb625beadd (patch) | |
tree | 9ac223d178014a1f23585798b1e8c10b6f3f8f3e /clang/lib/Format/WhitespaceManager.cpp | |
parent | f82d0187a7e581d4f8f825021dbcb08e8eb37d61 (diff) | |
download | llvm-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.cpp | 6 |
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); |