HazardyKnusperkeks added inline comments.
================ Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:80 + // directive, since these do not terminate a code block. + if (!Line.InPPDirective && Line.Level < IndentForLevel.size()) + IndentForLevel.resize(Line.Level + 1, -1); ---------------- Do we need this check? I assume `resize` has a check if it has to grow or shrink, so we would check twice when the size is to be changed and once if not. ================ Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:169-170 /// The indent in characters for each level. + /// It remembers the indent of previous lines (that are not PP directives) of + /// equal or lower levels. This is used to align formatted lines to the indent ---------------- And then reformat the comment. ================ Comment at: clang/unittests/Format/FormatTestSelective.cpp:663 + "#define some\n" // Formatted line + "#endif\n" // That this line is also formatted might be a bug. + " }};", // Dito: Bug? ---------------- Have you tried to see what is causing this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151047/new/ https://reviews.llvm.org/D151047 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits