thezbyg updated this revision to Diff 319057.
thezbyg added a comment.
Remove redundant line.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93846/new/
https://reviews.llvm.org/D93846
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/include/
thezbyg marked an inline comment as done.
thezbyg added a comment.
Yes, I do not have commit access and would like for someone to commit/push this
change. My name and email is `Albertas Vyšniauskas `.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D9
thezbyg created this revision.
thezbyg added a reviewer: MyDeveloperDay.
thezbyg requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Add new option called InsertEmptyLineBeforeAccessModifier. Empty line before
access modifier is inserted if th
thezbyg updated this revision to Diff 313863.
thezbyg added a comment.
Option renamed to EmptyLineBeforeAccessModifier.
Placed new configuration member in correct place alphabetically.
Last token in previous line is no longer checked when
EmptyLineBeforeAccessModifier is false.
Executed clang/doc
thezbyg marked 10 inline comments as done.
thezbyg added inline comments.
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1220
+ if (Style.InsertEmptyLineBeforeAccessModifier && PreviousLine &&
+ PreviousLine->Last->isOneOf(tok::semi, tok::r_brace) &&
RootTok
thezbyg added inline comments.
Comment at: clang/unittests/Format/FormatTest.cpp:8544-8556
+ EXPECT_EQ("struct foo {\n"
+" int i;\n"
+"\n"
+"private:\n"
+" int j;\n"
+"}\n",
+format("struct foo {\n"
--
thezbyg updated this revision to Diff 313973.
thezbyg added a comment.
Switched to verifyFormat in most of the tests.
Rerun clang-format.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93846/new/
https://reviews.llvm.org/D93846
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/inc
thezbyg updated this revision to Diff 314129.
thezbyg marked 3 inline comments as done.
thezbyg added a comment.
Added missing full stop.
Executed clang/doc/tools/dump_style.py to update ClangFormatStyleOptions.rst.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93846/new/
https://review
thezbyg marked 2 inline comments as done.
thezbyg added a comment.
After some updating, rebuilding and searching for differences in Objective-C++
formatting, I managed to find where the problem with these failing tests is. In
**_verifyFormat** function C++ code formatting is tested for stability
thezbyg added a comment.
When access modifier is in the same line with previous tokens,
**UnwrappedLineFormatter::formatFirstToken** is called with
**RootToken.NewlinesBefore** == 0, but empty line is only inserted if
**RootToken.NewlinesBefore** == 1. The following change fixes this and passes
thezbyg marked an inline comment as done.
thezbyg added inline comments.
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1221
+if (Style.EmptyLineBeforeAccessModifier &&
+PreviousLine->Last->isOneOf(tok::semi, tok::r_brace) &&
+RootToken.NewlinesBefore
thezbyg marked an inline comment as done.
thezbyg added inline comments.
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1221
+if (Style.EmptyLineBeforeAccessModifier &&
+PreviousLine->Last->isOneOf(tok::semi, tok::r_brace) &&
+RootToken.NewlinesBefore
thezbyg updated this revision to Diff 314962.
thezbyg added a comment.
Switched `EmptyLineBeforeAccessModifierStyle` option from bool to enum.
`EmptyLineBeforeAccessModifierStyle` option can now have one of four values:
`Never`, `DontModify`, `LogicalBlock`, `Always`.
`Never` removes all empty li
thezbyg updated this revision to Diff 315578.
thezbyg added a comment.
Diff updated. Previous diff was generated after rebase, and Phabricator change
preview did not show any unrelated changes, so I thought that everything is
fine.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93846/ne
thezbyg updated this revision to Diff 316446.
thezbyg added a comment.
Rebased changes on master.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93846/new/
https://reviews.llvm.org/D93846
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/incl
thezbyg updated this revision to Diff 316511.
thezbyg added a comment.
Renamed DontModify enum to Leave.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93846/new/
https://reviews.llvm.org/D93846
Files:
clang/docs/ClangFormatStyleOptions.rst
cla
thezbyg updated this revision to Diff 316660.
thezbyg added a comment.
Improved default style tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93846/new/
https://reviews.llvm.org/D93846
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/i
17 matches
Mail list logo