[PATCH] D146926: [clang-format] Add option to decorate reflowed block comments

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 28 12:10:07 PDT 2023


HazardyKnusperkeks added inline comments.


================
Comment at: clang/lib/Format/BreakableToken.cpp:406
   Decoration = "* ";
-  if (Lines.size() == 1 && !FirstInLine) {
+  if ((Lines.size() == 1 && !FirstInLine) || !Style.DecorateReflowedComments) {
     // Comments for which FirstInLine is false can start on arbitrary column,
----------------
So if set to `false` it will never add the decoration. But when set to `true` it still will not, if it's the first line.

This is not what I'd expect reading the documentation.

If you want to pursue this I think you should go for an enum with `Never`, `Always`, and `<insert name here>` (what we currently have).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146926/new/

https://reviews.llvm.org/D146926



More information about the cfe-commits mailing list