curdeius added inline comments.
Comment at: clang/include/clang/Format/Format.h:163
+ /// \endcode
+ bool AlignCompoundAssignments;
+
sstwcw wrote:
> curdeius wrote:
> > HazardyKnusperkeks wrote:
> > > MyDeveloperDay wrote:
> > > > This option is not independen
sstwcw added a comment.
@curdeius That would be great.
Comment at: clang/include/clang/Format/Format.h:163
+ /// \endcode
+ bool AlignCompoundAssignments;
+
curdeius wrote:
> HazardyKnusperkeks wrote:
> > MyDeveloperDay wrote:
> > > This option is not indepen
curdeius added a comment.
@sstwcw, would it help if I created a parent revision that only splits the
current enum-based option into a struct, so that you only add compound ops and
padding?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119599/new/
curdeius added a comment.
I'd really want to see simpler tests and everything put into a single
`AlignConsecutiveAssignment` option.
Comment at: clang/include/clang/Format/Format.h:163
+ /// \endcode
+ bool AlignCompoundAssignments;
+
HazardyKnusperkeks wrot
HazardyKnusperkeks added a comment.
I think we are going a very good way. Just some steps ahead.
Comment at: clang/include/clang/Format/Format.h:157
+ /// a &= 2;
+ /// bbb = 2;
+ ///
sstwcw wrote:
> HazardyKnusperkeks wrote:
> > sstwcw wrote:
> > > H
sstwcw marked 5 inline comments as done.
sstwcw added inline comments.
Comment at: clang/unittests/Format/FormatTest.cpp:16872
+ // that things still get aligned.
+ Alignment.ColumnLimit = 20;
EXPECT_EQ("inta(int x,\n"
sstwcw wrote:
> curdeius wrote:
>
sstwcw added inline comments.
Comment at: clang/include/clang/Format/Format.h:157
+ /// a &= 2;
+ /// bbb = 2;
+ ///
HazardyKnusperkeks wrote:
> sstwcw wrote:
> > HazardyKnusperkeks wrote:
> > > sstwcw wrote:
> > > > HazardyKnusperkeks wrote:
> > > > >
sstwcw updated this revision to Diff 408295.
sstwcw edited the summary of this revision.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119599/new/
https://reviews.llvm.org/D119599
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang
HazardyKnusperkeks added inline comments.
Comment at: clang/include/clang/Format/Format.h:157
+ /// a &= 2;
+ /// bbb = 2;
+ ///
sstwcw wrote:
> HazardyKnusperkeks wrote:
> > sstwcw wrote:
> > > HazardyKnusperkeks wrote:
> > > > curdeius wrote:
> > > >
sstwcw added inline comments.
Comment at: clang/include/clang/Format/Format.h:157
+ /// a &= 2;
+ /// bbb = 2;
+ ///
HazardyKnusperkeks wrote:
> sstwcw wrote:
> > HazardyKnusperkeks wrote:
> > > curdeius wrote:
> > > > I guess it would be complicated to
HazardyKnusperkeks added inline comments.
Comment at: clang/include/clang/Format/Format.h:151
+ /// When aligning assignments, whether compound assignments like
+ /// ``+=``'s are aligned along with ``=``'s.
sstwcw wrote:
> curdeius wrote:
> > You need to upd
sstwcw added inline comments.
Comment at: clang/lib/Format/WhitespaceManager.cpp:273
AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End,
- unsigned Column, F &&Matches,
+ unsigned Column, unsigned AnchorWidth, F &&Matche
sstwcw updated this revision to Diff 408177.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119599/new/
https://reviews.llvm.org/D119599
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
clang/lib/Format/Format.c
MyDeveloperDay requested changes to this revision.
MyDeveloperDay added inline comments.
This revision now requires changes to proceed.
Comment at: clang/lib/Format/WhitespaceManager.cpp:273
AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End,
-
sstwcw updated this revision to Diff 408172.
sstwcw marked an inline comment as done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119599/new/
https://reviews.llvm.org/D119599
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Fo
sstwcw marked 6 inline comments as done.
sstwcw added inline comments.
Comment at: clang/include/clang/Format/Format.h:151
+ /// When aligning assignments, whether compound assignments like
+ /// ``+=``'s are aligned along with ``=``'s.
curdeius wrote:
> You
HazardyKnusperkeks added inline comments.
Comment at: clang/include/clang/Format/Format.h:157
+ /// a &= 2;
+ /// bbb = 2;
+ ///
curdeius wrote:
> I guess it would be complicated to avoid adding an additional space here. I
> mean, it could be:
> ```
>
MyDeveloperDay added inline comments.
Comment at: clang/lib/Format/WhitespaceManager.cpp:468
+ // Widths of the aligned text.
+ // The part to the left of the anchor. For right-justified assignment
+ // operators, this includes the initial space before the sign but not
---
MyDeveloperDay added inline comments.
Comment at: clang/include/clang/Format/Format.h:163
+ /// \endcode
+ bool AlignCompoundAssignments;
+
This option is not independent of `AlignConsecutiveAssignments` is it? this
will cause confusion when people turn it on
curdeius requested changes to this revision.
curdeius added a comment.
This revision now requires changes to proceed.
Thanks for working on this!
Looks pretty good already.
Comment at: clang/include/clang/Format/Format.h:151
+ /// When aligning assignments, whether compound
sstwcw created this revision.
sstwcw added reviewers: curdeius, HazardyKnusperkeks.
sstwcw added projects: clang-format, clang-tools-extra.
sstwcw requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
About the column limit option in the test Ali
21 matches
Mail list logo