owenpan added inline comments.
================ Comment at: clang/lib/Format/WhitespaceManager.cpp:1433 // assert((int)C.StartOfTokenColumn >= C.Spaces); - appendIndentText( - ReplacementText, C.Tok->IndentLevel, std::max(0, C.Spaces), - std::max((int)C.StartOfTokenColumn, C.Spaces) - std::max(0, C.Spaces), - C.IsAligned); + unsigned Spaces = std::max(0, C.Spaces); + if (Style.UseTab == FormatStyle::UT_Never) { ---------------- So that we don't have to worry about `signed` vs `unsigned`. ================ Comment at: clang/lib/Format/WhitespaceManager.cpp:1434-1436 + if (Style.UseTab == FormatStyle::UT_Never) { + ReplacementText.append(Spaces, ' '); + } else { ---------------- Doing this would lose some of the abstraction we have now without any gain in performance? Then we should leave it (and `appendIndentText` below) as is. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138378/new/ https://reviews.llvm.org/D138378 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits