This is an archive of the discontinued LLVM Phabricator instance.

[clang-format][NFC] Improve documentation on ReflowComments
ClosedPublic

Authored by HazardyKnusperkeks on Nov 11 2022, 1:27 PM.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2022, 1:27 PM
HazardyKnusperkeks requested review of this revision.Nov 11 2022, 1:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2022, 1:27 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
owenpan added inline comments.Nov 13 2022, 5:59 PM
clang/include/clang/Format/Format.h
3073–3076

Let's leave it as is because the new lines don't always get a leading *:

$ cat foo.cpp
/* The LLVM Project is a collection of modular and reusable compiler and toolchain
   technologies. */
$ clang-format -style='{ReflowComments: true}' foo.cpp
/* The LLVM Project is a collection of modular and reusable compiler and
   toolchain technologies. */
3863

We need an empty line after /// \endcode.

owenpan added inline comments.Nov 13 2022, 6:03 PM
clang/include/clang/Format/Format.h
3863

We need an empty line after /// \endcode.

We need an empty /// line.

HazardyKnusperkeks marked 3 inline comments as done.
HazardyKnusperkeks added inline comments.
clang/include/clang/Format/Format.h
3073–3076

That was from a short glimpse on the code.
Adapted the text.

owenpan accepted this revision.Nov 14 2022, 3:08 PM
This revision is now accepted and ready to land.Nov 14 2022, 3:08 PM
rymiel added inline comments.Nov 15 2022, 2:15 AM
clang/include/clang/Format/Format.h
3073–3076

Let's leave it as is because the new lines don't always get a leading *:

I suppose this also ties into https://github.com/llvm/llvm-project/issues/58710

This revision was landed with ongoing or failed builds.Nov 15 2022, 10:02 PM
This revision was automatically updated to reflect the committed changes.