[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.
Elliott Maguire via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 17 14:39:07 PST 2022
glotchimo added inline comments.
================
Comment at: clang/lib/Format/WhitespaceManager.cpp:735-742
+ if (C.Tok->Previous && C.Tok->Previous->is(tok::kw_operator)) {
+ FormatToken *Next = C.Tok->Next;
+ while (Next && Next->NewlinesBefore == 0) {
+ if (Next->Tok.is(tok::l_brace))
+ return false;
+ Next = Next->Next;
+ }
----------------
curdeius wrote:
> curdeius wrote:
> > This should fix the `operator/**/ =` problem.
> Can't we simplify this?
I previously thought this would misalign other symbols succeeding `operator` but realize now an identifier called `operator` would differ from the actual keyword. Away from machine right now but will update the patch later today.
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