owenpan added inline comments.
================ Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2769 - if (Style.isCSharp()) { do { ---------------- From https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements, it's unclear whether the braces should be removed when a block has a do-while loop as its single statement. Should I put the braces back and add handling of do-while for `RemoveBracesLLVM`? ================ Comment at: clang/lib/Format/WhitespaceManager.cpp:231-239 + if (Change.Tok->is(TT_LineComment) || !Change.IsInsideToken) { LastBlockComment = &Change; - else { - if ((Change.StartOfBlockComment = LastBlockComment)) + } else { + if ((Change.StartOfBlockComment = LastBlockComment)) { Change.IndentationOffset = Change.StartOfTokenColumn - Change.StartOfBlockComment->StartOfTokenColumn; ---------------- It would be nice to remove the braces of the `else` here. See https://github.com/llvm/llvm-project/issues/55663. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126157/new/ https://reviews.llvm.org/D126157 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits