@@ -955,6 +955,151 @@ the configuration (without a prefix: ``Auto``).
955955 }
956956
957957
958+ .. _AlignConsecutiveTableGenBreakingDAGArgColons :
959+
960+ **AlignConsecutiveTableGenBreakingDAGArgColons ** (``AlignConsecutiveStyle ``) :versionbadge: `clang-format 19 ` :ref: `¶ <AlignConsecutiveTableGenBreakingDAGArgColons >`
961+ Style of aligning consecutive TableGen DAGArg operator colons.
962+ If enabled, align the colon inside DAGArg which have line break inside.
963+ This works only when TableGenBreakInsideDAGArg is BreakElements or
964+ BreakAll and the DAGArg is not excepted by
965+ TableGenBreakingDAGArgOperators's effect.
966+
967+ .. code-block :: c++
968+
969+ let dagarg = (ins
970+ a :$src1,
971+ aa :$src2,
972+ aaa:$src3
973+ )
974+
975+ Nested configuration flags:
976+
977+ Alignment options.
978+
979+ They can also be read as a whole for compatibility. The choices are:
980+ - None
981+ - Consecutive
982+ - AcrossEmptyLines
983+ - AcrossComments
984+ - AcrossEmptyLinesAndComments
985+
986+ For example, to align across empty lines and not across comments, either
987+ of these work.
988+
989+ .. code-block :: c++
990+
991+ AlignConsecutiveTableGenBreakingDAGArgColons: AcrossEmptyLines
992+
993+ AlignConsecutiveTableGenBreakingDAGArgColons:
994+ Enabled: true
995+ AcrossEmptyLines: true
996+ AcrossComments: false
997+
998+ * ``bool Enabled `` Whether aligning is enabled.
999+
1000+ .. code-block :: c++
1001+
1002+ #define SHORT_NAME 42
1003+ #define LONGER_NAME 0x007f
1004+ #define EVEN_LONGER_NAME (2)
1005+ #define foo(x) (x * x)
1006+ #define bar(y, z) (y + z)
1007+
1008+ int a = 1;
1009+ int somelongname = 2;
1010+ double c = 3;
1011+
1012+ int aaaa : 1;
1013+ int b : 12;
1014+ int ccc : 8;
1015+
1016+ int aaaa = 12;
1017+ float b = 23;
1018+ std::string ccc;
1019+
1020+ * ``bool AcrossEmptyLines `` Whether to align across empty lines.
1021+
1022+ .. code-block :: c++
1023+
1024+ true:
1025+ int a = 1;
1026+ int somelongname = 2;
1027+ double c = 3;
1028+
1029+ int d = 3;
1030+
1031+ false:
1032+ int a = 1;
1033+ int somelongname = 2;
1034+ double c = 3;
1035+
1036+ int d = 3;
1037+
1038+ * ``bool AcrossComments `` Whether to align across comments.
1039+
1040+ .. code-block :: c++
1041+
1042+ true:
1043+ int d = 3;
1044+ /* A comment. */
1045+ double e = 4;
1046+
1047+ false:
1048+ int d = 3;
1049+ /* A comment. */
1050+ double e = 4;
1051+
1052+ * ``bool AlignCompound `` Only for ``AlignConsecutiveAssignments ``. Whether compound assignments
1053+ like ``+= `` are aligned along with ``= ``.
1054+
1055+ .. code-block :: c++
1056+
1057+ true:
1058+ a &= 2;
1059+ bbb = 2;
1060+
1061+ false:
1062+ a &= 2;
1063+ bbb = 2;
1064+
1065+ * ``bool AlignFunctionPointers `` Only for ``AlignConsecutiveDeclarations ``. Whether function pointers are
1066+ aligned.
1067+
1068+ .. code-block :: c++
1069+
1070+ true:
1071+ unsigned i;
1072+ int &r;
1073+ int *p;
1074+ int (*f)();
1075+
1076+ false:
1077+ unsigned i;
1078+ int &r;
1079+ int *p;
1080+ int (*f)();
1081+
1082+ * ``bool PadOperators `` Only for ``AlignConsecutiveAssignments ``. Whether short assignment
1083+ operators are left-padded to the same length as long ones in order to
1084+ put all assignment operators to the right of the left hand side.
1085+
1086+ .. code-block :: c++
1087+
1088+ true:
1089+ a >>= 2;
1090+ bbb = 2;
1091+
1092+ a = 2;
1093+ bbb >>= 2;
1094+
1095+ false:
1096+ a >>= 2;
1097+ bbb = 2;
1098+
1099+ a = 2;
1100+ bbb >>= 2;
1101+
1102+
9581103.. _AlignConsecutiveTableGenCondOperatorColons :
9591104
9601105**AlignConsecutiveTableGenCondOperatorColons ** (``AlignConsecutiveStyle ``) :versionbadge: `clang-format 19 ` :ref: `¶ <AlignConsecutiveTableGenCondOperatorColons >`
0 commit comments