llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.61k stars 11.82k forks source link

Feature Request: Add clang-format setting to disable "*" being added when ReflowComments is used with /* */ comments #58710

Open sean-mcmanus opened 1 year ago

sean-mcmanus commented 1 year ago

Create a .clang-format file with contents

ColumnLimit: 80
ReflowComments: true

with a test.cpp file (in the same folder as the .clang-format file) like

/* erfdfdfdfdfdfd fd fdfd fd fd fd fd fd fd fd fd fd fd fd fd fd fdf df df df df df df df df df df df fd f */
void func()
{
}

Bug: The result is

/* erfdfdfdfdfdfd fd fdfd fd fd fd fd fd fd fd fd fd fd fd fd fd fdf df df df df
 * df df df df df df df fd f */

but we'd like a setting so the result can be

/* erfdfdfdfdfdfd fd fdfd fd fd fd fd fd fd fd fd fd fd fd fd fd fdf df df df df
   df df df df df df df fd f */
llvmbot commented 1 year ago

@llvm/issue-subscribers-clang-format

llvmbot commented 1 year ago

@llvm/issue-subscribers-good-first-issue

crnsh commented 1 year ago

Can I work on this?

apwadkar commented 1 year ago

I've started working on this, since it seems like it hasn't been picked up. My current idea is adding a DecorateReflowedComments option to control whether or not the * appears for reflowed block comments. I have a review here.

xonx4l commented 1 year ago

I would like to work on this can you give me a little more context

sean-mcmanus commented 1 year ago

@xonx4l Who are you asking? What type of context do you want?

xonx4l commented 1 year ago

@sean-mcmanus I wanted a little bit more info on this issue as I am unable to reproduce the described bug . Thanks .

sean-mcmanus commented 1 year ago

@xonx4l I've edited the original description to be more explicit in regards to the .clang-format file. Are you able to repro it now? I repro the bug with clang-format 16.0.6 on Windows. If not, I could look into providing an exact command line argument (or if you can let me know what clang-format call you're using that's not working).

WLOrion commented 11 months ago

Hello @sean-mcmanus, I'd like to take to me this issue. How can I assign it to me? Meanwhile, I going to work to understand and, if possbile, resolve it.

sean-mcmanus commented 11 months ago

@WLOrion I don't know. I don't work on LLVM/clang-format. I just use it and filed the feature request.

WLOrion commented 11 months ago

@mydeveloperday, can you help me about that?

sean-mcmanus commented 11 months ago

@WLOrion FYI, there are contribution instructions at https://llvm.org/docs/Contributing.html (but I haven't read them).

Sh0g0-1758 commented 9 months ago

@sean-mcmanus , this seems like a simple issue. Can you please the issue to me so that I can start working on it.

sean-mcmanus commented 9 months ago

@Sh0g0-1758 I'm not an LLVM developer. I don't have permissions to assign issues to people in this repo.

rajkumarananthu commented 2 months ago

Hi,

I am working on one more issue: https://github.com/llvm/llvm-project/issues/53390 where I am adding a similar boolean flag to control to the indentation of NamespaceAliases and UsingDeclarations, I would like to add this as well.

If anyone has permissions, please assign the issue to me.

Thanks Rajkumar Ananthu.