[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-28 Thread Ameer J via cfe-commits
ameerj wrote: @HazardyKnusperkeks Thanks for the review! I don't have repo permissions so I can't run all CI workflows or merge the PR. https://github.com/llvm/llvm-project/pull/84988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-27 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/84988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-26 Thread Ameer J via cfe-commits
https://github.com/ameerj updated https://github.com/llvm/llvm-project/pull/84988 >From 0d0868ddffe1b0668a57c10cc89614ab7c840634 Mon Sep 17 00:00:00 2001 From: ameerj Date: Sat, 16 Mar 2024 17:03:47 -0400 Subject: [PATCH 1/3] [clang-format] Add BreakFunctionDefinitionParameters option --- cl

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-26 Thread Björn Schäpers via cfe-commits
@@ -7951,6 +7951,24 @@ TEST_F(FormatTest, AllowAllArgumentsOnNextLineDontAlign) { Input, Style); } +TEST_F(FormatTest, BreakFunctionDefinitionParameters) { HazardyKnusperkeks wrote: As I understand you want this, so that you can put all argume

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-26 Thread Björn Schäpers via cfe-commits
@@ -2218,6 +2218,11 @@ struct FormatStyle { /// \version 3.8 bool BreakAfterJavaFieldAnnotations; + /// If ``true``, clang-format will always break before function definition + /// parameters + /// \version 19 + bool BreakFunctionDefinitionParameters;

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-26 Thread Ameer J via cfe-commits
@@ -5317,6 +5318,12 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.NewlinesBefore > 1 && Style.MaxEmptyLinesToKeep > 0) return true; + if (Style.BreakFunctionDefinitionParameters && Line.MightBeFunctionDecl && ameerj wrote

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-26 Thread Ameer J via cfe-commits
https://github.com/ameerj updated https://github.com/llvm/llvm-project/pull/84988 >From 0d0868ddffe1b0668a57c10cc89614ab7c840634 Mon Sep 17 00:00:00 2001 From: ameerj Date: Sat, 16 Mar 2024 17:03:47 -0400 Subject: [PATCH 1/2] [clang-format] Add BreakFunctionDefinitionParameters option --- cl

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-25 Thread Björn Schäpers via cfe-commits
@@ -7951,6 +7951,24 @@ TEST_F(FormatTest, AllowAllArgumentsOnNextLineDontAlign) { Input, Style); } +TEST_F(FormatTest, BreakFunctionDefinitionParameters) { + FormatStyle Style = getLLVMStyleWithColumns(80); HazardyKnusperkeks wrote: ```sugges

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-25 Thread Björn Schäpers via cfe-commits
@@ -2218,6 +2218,11 @@ struct FormatStyle { /// \version 3.8 bool BreakAfterJavaFieldAnnotations; + /// If ``true``, clang-format will always break before function definition + /// parameters + /// \version 19 + bool BreakFunctionDefinitionParameters;

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-25 Thread Björn Schäpers via cfe-commits
@@ -5317,6 +5318,12 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.NewlinesBefore > 1 && Style.MaxEmptyLinesToKeep > 0) return true; + if (Style.BreakFunctionDefinitionParameters && Line.MightBeFunctionDecl && HazardyKnusp

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-25 Thread Björn Schäpers via cfe-commits
@@ -2218,6 +2218,11 @@ struct FormatStyle { /// \version 3.8 bool BreakAfterJavaFieldAnnotations; + /// If ``true``, clang-format will always break before function definition + /// parameters HazardyKnusperkeks wrote: ```suggestion /// parameters. ```

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-25 Thread Ameer J via cfe-commits
ameerj wrote: @HazardyKnusperkeks @owenca I'd like to request a review please https://github.com/llvm/llvm-project/pull/84988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-16 Thread Ameer J via cfe-commits
https://github.com/ameerj updated https://github.com/llvm/llvm-project/pull/84988 >From 0d0868ddffe1b0668a57c10cc89614ab7c840634 Mon Sep 17 00:00:00 2001 From: ameerj Date: Sat, 16 Mar 2024 17:03:47 -0400 Subject: [PATCH] [clang-format] Add BreakFunctionDefinitionParameters option --- clang/d

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-12 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-em

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-format Author: Ameer J (ameerj) Changes This adds an option to break function definition parameters, putting them on the next line after the function's opening paren. This was a missing step towards allowing styles whic

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-12 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-12 Thread Ameer J via cfe-commits
https://github.com/ameerj created https://github.com/llvm/llvm-project/pull/84988 This adds an option to break function definition parameters, putting them on the next line after the function's opening paren. This was a missing step towards allowing styles which require all function definitio