[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-04-11 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 512480. jrmolin added a comment. fix a comment in the documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-04-11 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 512449. jrmolin marked an inline comment as done. jrmolin added a comment. - updated the documentation to show the option works for function declaration and definition Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-04-11 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin marked 2 inline comments as done. jrmolin added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:1380 + Example uses + ``AlwaysBreakAfterReturnType`` set to ``All``. + MyDeveloperDay wrote: > This isn't relevant is it? `AlwaysBreakAft

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-04-11 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 512447. jrmolin marked 3 inline comments as done. jrmolin added a comment. - updated the tests to use long-form - added new tests to verify the no-parameter cases - updated the documentation to minimize formatting variables - ran the style guide generator Re

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:1374 +**AlwaysBreakBeforeFunctionParameters** (``Boolean``) :versionbadge:`clang-format 16.0` :ref:`¶ ` + If ``true``, always break before function parameters in a declaration. + --

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Can you show your example from a implementation case and not just a declaration i.e. what happens with `int function1(int param1) {}` Comment at: clang/lib/Format/TokenAnnotator.cpp:4789 + if (Left.is(tok::l_paren) && Style.AlwaysBreakBeforeFu

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I don't like using additional variables in unit tests, if someone changes 25400 multiple tests could break, each test should be stand alone in my view Herald added a comment. NOTE: Clang-Format Team Automated Review Comment Your review contains a change to Clan

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-29 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin added a comment. In D125171#4230397 , @jrmolin wrote: > I think I have hit all the requests now. We're in the middle of building > release candidates and testing, so management is taking longer and longer to > get back to me about a style guide

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-29 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin added a comment. I think I have hit all the requests now. We're in the middle of building release candidates and testing, so management is taking longer and longer to get back to me about a style guide for my team. We added it, because it forces a consistent look across all function de

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-29 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 509317. jrmolin added a comment. ran the formatter, ran the documentation generator. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 Files: clang/docs/ClangFormatSt

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Looks good to me, not giving my formal approval since the ongoing discussion about the style guide. Comment at: clang/include/clang/Format/Format.h:823 + /// \endcode + /// \version 16.0 + bool AlwaysBreakBeforeFunctionParameters; ---

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-27 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin marked an inline comment as done. jrmolin added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:4742-4748 + if (Left.is(tok::l_paren) && Style.AlwaysBreakBeforeFunctionParameters && + !Right.is(tok::r_paren) && Left.Previous) { + const FormatTo

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-27 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 508639. jrmolin marked 2 inline comments as done. jrmolin added a comment. pulled main, re-generated the docs, then re-generated the diff. Also added a parse test and collapsed some nested `if` conditions. Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:4742-4748 + if (Left.is(tok::l_paren) && Style.AlwaysBreakBeforeFunctionParameters && + !Right.is(tok::r_paren) && Left.Previous) { + const FormatToken &TwoPrevious = *Left.Previo

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-23 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin added a comment. In D125171#4215910 , @MyDeveloperDay wrote: > if you go ahead an rebase your should get rG7a5b95732ade: [clang-format] NFC > Format.h and ClangFormatStyleOptions.rst are out of date >

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Please rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. if you go ahead an rebase your should get rG7a5b95732ade: [clang-format] NFC Format.h and ClangFormatStyleOptions.rst are out of date that will remove the need for the Macro section in the rst

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3663 +.. _Macros: + jrmolin wrote: > I didn't modify this section in the header at all. I assume someone modified > the Format.h file and didn't update the docs. that need

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-22 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin marked 4 inline comments as done. jrmolin added a comment. I still don't know what `Please write it out long form` means for the unit test. Comment at: clang/docs/ClangFormatStyleOptions.rst:3663 +.. _Macros: + I didn't modify this section in the head

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-22 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 507539. jrmolin added a comment. I updated the code comment in Format.h and ran the docs generator. I didn't modify the Macros section, but that got updated when I ran the docs generator. We don't have a published style guide, unfortunately. I can work towar

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-16 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:1372 +.. _AlwaysBreakBeforeFunctionParameters: + +**AlwaysBreakBeforeFunctionParameters** (``Boolean``) :versionbadge:`clang-format 16.0` jrmolin wrote: > MyDeveloperDay wro

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-15 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin added a comment. In D125171#4195298 , @owenpan wrote: > In D125171#4193996 , @jrmolin wrote: > >> In D125171#4167866 , @owenpan >> wrote: >> >>> Please see >>> h

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-14 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D125171#4193996 , @jrmolin wrote: > In D125171#4167866 , @owenpan wrote: > >> Please see >> https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options. >

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/docs/ClangFormatStyleOptions.rst:1372 +.. _AlwaysBreakBeforeFunctionParameters: + +**AlwaysBreakBeforeFunctionParameters** (``

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-14 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 505215. jrmolin marked 3 inline comments as done. jrmolin added a comment. respond to code review requests/comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 Fi

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-14 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin marked 4 inline comments as done. jrmolin added inline comments. Comment at: clang/include/clang/Format/Format.h:827 + /// \code + /// someFunction( + /// int argument1, HazardyKnusperkeks wrote: > That's not a valid declaration (missing return

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-14 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin added a comment. In D125171#4167866 , @owenpan wrote: > Please see > https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options. I am doing this for my team, which writes the security endpoint for Elastic Defend. T

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. And please add an entry to the `ReleaseNotes.rst`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 ___ cfe-commits mailing l

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please reupload with the complete context. Please add tests. Comment at: clang/include/clang/Format/Format.h:827 + /// \code + /// someFunction( + /// int argument1, That's not a valid declaration (missing return

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Please add unit tests to relevant files in `clang/unittests/Format/`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 ___ cfe-commits m

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. See also https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 ___

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Please see https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 _

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-03 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 502112. jrmolin added a comment. Finally figured out how to run the latest `git-clang-format` on the code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 Files: cla

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-02 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin added reviewers: MyDeveloperDay, owenpan. jrmolin added a comment. I finally found the correct CodeOwners.rst file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-03-02 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 501836. jrmolin added a comment. Updated the version string in the docs and pulled in main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 Files: clang/docs/ClangF

[PATCH] D125171: Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2022-05-07 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin created this revision. Herald added a project: All. jrmolin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add the definition, documentation, and implementation for a new clang-format option. Repository: rG LLVM Github Monorep