Index: clang/lib/Format/WhitespaceManager.cpp =================================================================== --- clang/lib/Format/WhitespaceManager.cpp +++ clang/lib/Format/WhitespaceManager.cpp @@ -425,6 +425,10 @@ return true; } + // Continued template parameter. + if (Changes[ScopeStart - 1].Tok->is(TT_TemplateOpener)) + return true; + return false; }; Index: clang/unittests/Format/FormatTest.cpp =================================================================== --- clang/unittests/Format/FormatTest.cpp +++ clang/unittests/Format/FormatTest.cpp @@ -18726,6 +18726,13 @@ " {a_longer_name_for_wrap,\n" " a_longer_name_for_wrap}};", Alignment); + + Alignment.ColumnLimit = 60; + verifyFormat("using II = typename TI>::I;\n" + "using I = std::conditional_t= 0,\n" + " std::ic,\n" + " std::ic>;", + Alignment); } TEST_F(FormatTest, AlignConsecutiveBitFields) {