[PATCH] D146926: [clang-format] Add option to decorate reflowed block comments
Adheesh Wadkar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 28 20:11:15 PDT 2023
apwadkar 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,
----------------
HazardyKnusperkeks wrote:
> 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).
> 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.
Yeah, I think that makes sense. That's what I was thinking while working on the unit tests, because I realized this was breaking the existing style.
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