[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-18 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo added a comment. Amazing, thank you. This is my first patch so I will need help landing, but I will also apply for commit access as I intend to keep contributing. Here is my name and email for this commit: Elliott Maguire Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo updated this revision to Diff 400696. glotchimo marked an inline comment as done. glotchimo added a comment. Simplify by removing look-ahead (unnecessary b/c of difference between ident and tokens). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
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

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo updated this revision to Diff 400623. glotchimo marked 4 inline comments as done. glotchimo added a comment. Use `getPreviousNonComment` to account for inline comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117421/new/

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo added a comment. In 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

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo added a comment. 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() =

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo updated this revision to Diff 400606. glotchimo marked an inline comment as done. glotchimo added a comment. Add overload declaration look-ahead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117421/new/ https://reviews.llvm.org/D117421

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-17 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo updated this revision to Diff 400455. glotchimo marked an inline comment as done. glotchimo added a comment. Add equality operator tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117421/new/ https://reviews.llvm.org/D117421 Files:

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-16 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo updated this revision to Diff 400439. glotchimo added a comment. Explicitly declare `FormatToken` type instead of using `auto`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117421/new/ https://reviews.llvm.org/D117421 Files:

[PATCH] D117421: [clang-format] Fix incorrect alignment of operator= overloads.

2022-01-16 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo added a comment. Excellent, thank you! I'll get right on these edits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117421/new/ https://reviews.llvm.org/D117421 ___ cfe-commits mailing list

[PATCH] D117421: Fix 31568 (i.e. incorrect alignment of operator= overloads).

2022-01-16 Thread Elliott Maguire via Phabricator via cfe-commits
glotchimo created this revision. glotchimo added a comment. glotchimo updated this revision to Diff 400390. glotchimo added reviewers: MyDeveloperDay, djasper. glotchimo added a project: clang-format. glotchimo added a subscriber: cfe-commits. glotchimo published this revision for review. Herald