[clang] [clang-format] Fix tabs in aligned ForIndentation continuations (PR #235553)

via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 31 06:41:00 PDT 2026


================
@@ -3630,6 +3630,31 @@ TEST_F(AlignmentTest, ContinuedAligned) {
                Style);
 }
 
+TEST_F(AlignmentTest, ContinuedAlignedForIndentation) {
+  FormatStyle Style = getLLVMStyleWithColumns(30);
+  Style.UseTab = FormatStyle::UT_ForIndentation;
+  Style.TabWidth = Style.IndentWidth = 4;
+
+  verifyFormat("void f() {\n"
+               "\tabcdef =\n"
+               "\t    foo(111111, 222222,\n"
+               "\t        333333);\n"
+               "}",
+               Style);
+}
+
+TEST_F(AlignmentTest, InlineBracedListForIndentation) {
----------------
mwdmwd wrote:

This test protects the initialiser improvement from #191217 (that PR only adds AlignWithSpaces tests, not ForIndentation

https://github.com/llvm/llvm-project/pull/235553


More information about the cfe-commits mailing list