[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-15 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8da319fe770b: [clang-format][NFC] Give State.Stack.back() a meaningful name (authored by HazardyKnusperkeks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 408222. HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Added const CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119597/new/ https://reviews.llvm.o

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @HazardyKnusperkeks agreed, I'm fine with this approach (especially on what is one of the more confusing parts of clang-format) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119597/new/ https://reviews.llvm.org/D119

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D119597#3316643 , @MyDeveloperDay wrote: > I like this change for clarity reasons, my only concern and it's not based on > evidence is what if any of these functions get passed in State, and then they > themselves

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I like this change for clarity reasons, my only concern and it's not based on evidence is what if any of these functions get passed in State, and then they themselves alter the State.Stack? In most cases I'd expect CurrentState to always be correct, but doesn't i

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks planned changes to this revision. HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1356 moveStatePastScopeCloser(State); + // Do not use CurrentState here, since the two functions before may change the + // S

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM whether you keep it as is or use a pointer. It looks like it would be cool if we had some sort of expression aliases in the language... `using CurrentState = State.Stack.back()`... One

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1514 + auto &CurrentState = State.Stack.back(); + Can you make it `const` here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D119597: [clang-format][NFC] Give State.Stack.back() a meaningful name

2022-02-11 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: MyDeveloperDay, owenpan, curdeius. HazardyKnusperkeks added a project: clang-format. HazardyKnusperkeks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without th