[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 17 12:11:48 PST 2022
curdeius added a comment.
In D117421#3249126 <https://reviews.llvm.org/D117421#3249126>, @glotchimo wrote:
> I was tinkering with the use of `getPreviousNonComment` last night before signing off and the problem that I noticed was that, though it stops the `operator=` from being split and aligned with previous lines, it adds a single space:
>
> /* long long padding */ int() = default;
> int &operator() = default;
> -int &operator/**/=();
> +int &operator/**/ =();
>
> Going to mess around with it some more today, but do you have any ideas as to why that might be happening?
I don't think it's related to `getPreviousNonComment`, but to the fact that we add spaces after block comments.
For me it's what we expect to have.
In D117421#3249196 <https://reviews.llvm.org/D117421#3249196>, @glotchimo wrote:
> In D117421#3247632 <https://reviews.llvm.org/D117421#3247632>, @curdeius wrote:
>
>> Could you check if your patch fixes https://github.com/llvm/llvm-project/issues/33044 as well?
>> If so, please add tests.
>
> As of right now, it doesn't fix 33044. Should I investigate and see if I can get this addressed in the same patch, or should it be considered a separate bug?
It will be certainly a different patch, I had just thought that your patch would fix it tangentially.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117421/new/
https://reviews.llvm.org/D117421
More information about the cfe-commits
mailing list