https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH 1/9] Fixes overload operator in BreakAfterAttributes
---
clang/lib/Format/Co
@@ -26451,6 +26451,20 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"{\n"
"}",
CtorDtorCode, Style);
+
+ Style.BreakBeforeBraces = FormatStyle::BS_Attach;
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH 1/8] Fixes overload operator in BreakAfterAttributes
---
clang/lib/Format/Co
@@ -583,20 +583,26 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
return true;
}
- // If the return type spans multiple lines, wrap before the function name.
- if (((Current.is(TT_FunctionDeclarationName) &&
-!State.Line->ReturnTypeWrapped
XDeme wrote:
Is it not a regression, I didn't verify the path of clang-format correctly, I
thought I was using clang 16.0.6, but it was using the one I built
https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@list
HazardyKnusperkeks wrote:
I got a mail, but it seems you have deleted the comment? Is it a regression?
Could you bisect it?
And you don't need (for me) to comment, when you addressed a comment, just
click on resolved. Would reduce the amount of mails in my inbox. ;)
https://github.com/llvm/ll
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
XDeme wrote:
One thing that I checked only now, is that with clang-format 16.0.6 and 17.0.6,
it formats correctly.
But with `clang-format version 18.0.0 (https://github.com/llvm/llvm-project.git
a6c02edd6eac476523b5c73f29619a7a9e054872)` is doens't anymore, so this is a
regression introduced r
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
return true;
}
- // If the return type spans multiple lines, wrap before the function name.
- if (((Current.is(TT_FunctionDeclarationName) &&
-!State.Line->ReturnTypeWrapped
@@ -26465,6 +26451,21 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"{\n"
"}",
CtorDtorCode, Style);
+
+ Style.BreakBeforeBraces = FormatStyle::BS_Attach;
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
@@ -583,21 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
return true;
}
- // If the return type spans multiple lines, wrap before the function name.
- if (((Current.is(TT_FunctionDeclarationName) &&
-!State.Line->ReturnTypeWrapped
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH 1/7] Fixes overload operator in BreakAfterAttributes
---
clang/lib/Format/Co
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
return true;
}
- // If the return type spans multiple lines, wrap before the function name.
- if (((Current.is(TT_FunctionDeclarationName) &&
-!State.Line->ReturnTypeWrapped
@@ -583,21 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
return true;
}
- // If the return type spans multiple lines, wrap before the function name.
- if (((Current.is(TT_FunctionDeclarationName) &&
-!State.Line->ReturnTypeWrapped
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
return true;
}
- // If the return type spans multiple lines, wrap before the function name.
- if (((Current.is(TT_FunctionDeclarationName) &&
-!State.Line->ReturnTypeWrapped
@@ -26465,6 +26451,21 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"{\n"
"}",
CtorDtorCode, Style);
+
+ Style.BreakBeforeBraces = FormatStyle::BS_Attach;
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
return true;
}
- // If the return type spans multiple lines, wrap before the function name.
- if (((Current.is(TT_FunctionDeclarationName) &&
-!State.Line->ReturnTypeWrapped
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH 1/6] Fixes overload operator in BreakAfterAttributes
---
clang/lib/Format/Co
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH 1/5] Fixes overload operator in BreakAfterAttributes
---
clang/lib/Format/Co
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -593,7 +593,8 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
// name.
!Style.isJavaScript()) ||
(Current.is(tok::kw_operator) && Previous.isNot(tok::coloncolon))) &&
- Previous.isNot(tok::kw_template) && CurrentState.BreakBefor
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -26417,6 +26417,20 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"void g() {}",
CtorDtorCode, Style);
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
XDeme wrote:
Fixed, Moved test to the bottom
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH 1/4] Fixes overload operator in BreakAfterAttributes
---
clang/lib/Format/Co
https://github.com/XDeme deleted https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -26417,6 +26417,20 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"void g() {}",
CtorDtorCode, Style);
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
+ constexpr StringRef OperatorOverloadCode(
XD
@@ -593,7 +593,8 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
// name.
!Style.isJavaScript()) ||
(Current.is(tok::kw_operator) && Previous.isNot(tok::coloncolon))) &&
- Previous.isNot(tok::kw_template) && CurrentState.BreakBefor
https://github.com/XDeme deleted https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH 1/3] Fixes overload operator in BreakAfterAttributes
---
clang/lib/Format/Co
https://github.com/XDeme deleted https://github.com/llvm/llvm-project/pull/74943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -26417,6 +26417,20 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"void g() {}",
CtorDtorCode, Style);
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
XDeme wrote:
Changed verifyFormat -> verifyNoC
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH 1/2] Fixes overload operator in BreakAfterAttributes
---
clang/lib/Format/Co
@@ -26417,6 +26417,20 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"void g() {}",
CtorDtorCode, Style);
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
XDeme wrote:
To restore the value, is it ok if
@@ -593,7 +593,8 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
// name.
!Style.isJavaScript()) ||
(Current.is(tok::kw_operator) && Previous.isNot(tok::coloncolon))) &&
- Previous.isNot(tok::kw_template) && CurrentState.BreakBefor
@@ -593,7 +593,8 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
// name.
!Style.isJavaScript()) ||
(Current.is(tok::kw_operator) && Previous.isNot(tok::coloncolon))) &&
- Previous.isNot(tok::kw_template) && CurrentState.BreakBefor
@@ -26417,6 +26417,20 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"void g() {}",
CtorDtorCode, Style);
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
+ constexpr StringRef OperatorOverloadCode(
Ha
@@ -593,7 +593,8 @@ bool ContinuationIndenter::mustBreak(const LineState
&State) {
// name.
!Style.isJavaScript()) ||
(Current.is(tok::kw_operator) && Previous.isNot(tok::coloncolon))) &&
- Previous.isNot(tok::kw_template) && CurrentState.BreakBefor
@@ -26417,6 +26417,20 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"void g() {}",
CtorDtorCode, Style);
+ Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;
HazardyKnusperkeks wrote:
You are changing the
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: None (XDeme)
Changes
Fixes llvm/llvm-project#74901
---
Full diff: https://github.com/llvm/llvm-project/pull/74943.diff
2 Files Affected:
- (modified) clang/lib/Format/ContinuationIndenter.cpp (+2-1)
- (modified) clang/unittests/
https://github.com/XDeme created https://github.com/llvm/llvm-project/pull/74943
Fixes llvm/llvm-project#74901
>From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001
From: XDeme
Date: Sat, 9 Dec 2023 14:31:12 -0300
Subject: [PATCH] Fixes overload operator in BreakAfterAttribute
52 matches
Mail list logo