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
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
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
@@ -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
@@ -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;
@@ -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
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
@@ -7951,6 +7951,24 @@ TEST_F(FormatTest, AllowAllArgumentsOnNextLineDontAlign)
{
Input, Style);
}
+TEST_F(FormatTest, BreakFunctionDefinitionParameters) {
+ FormatStyle Style = getLLVMStyleWithColumns(80);
HazardyKnusperkeks wrote:
```sugges
@@ -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;
@@ -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
@@ -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.
```
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
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
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
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
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
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
17 matches
Mail list logo