https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/122282
___
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/122282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/122282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/122282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/123279
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/123279
>From 04b03d24d661dc8e8503269b7ddf55140e88de20 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 16 Jan 2025 19:45:33 -0800
Subject: [PATCH 1/2] [clang-format] Correctly annotate braces in macro
definitions
Fi
owenca wrote:
See https://github.com/llvm/llvm-project/issues/123144#issuecomment-2597430287.
https://github.com/llvm/llvm-project/pull/100980
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
@@ -28188,6 +28188,17 @@ TEST_F(FormatTest, BreakBinaryOperations) {
" | byte_buffer[2] << 16\n"
" | byte_buffer[3] << 24;",
Style);
+
+ Style.BreakBinaryOperations = FormatStyle::BBO_OnePerLine;
+
@@ -28188,6 +28188,17 @@ TEST_F(FormatTest, BreakBinaryOperations) {
" | byte_buffer[2] << 16\n"
" | byte_buffer[3] << 24;",
Style);
+
+ Style.BreakBinaryOperations = FormatStyle::BBO_OnePerLine;
+
@@ -147,7 +147,8 @@ static bool startsNextOperand(const FormatToken &Current) {
// Returns \c true if \c Current is a binary operation that must break.
static bool mustBreakBinaryOperation(const FormatToken &Current,
const FormatStyle &Style
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/122282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -147,7 +147,8 @@ static bool startsNextOperand(const FormatToken &Current) {
// Returns \c true if \c Current is a binary operation that must break.
static bool mustBreakBinaryOperation(const FormatToken &Current,
const FormatStyle &Style
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/123279
Fixes #123179.
>From 04b03d24d661dc8e8503269b7ddf55140e88de20 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 16 Jan 2025 19:45:33 -0800
Subject: [PATCH] [clang-format] Correctly annotate braces in macro defi
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/122282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -28188,6 +28188,16 @@ TEST_F(FormatTest, BreakBinaryOperations) {
" | byte_buffer[2] << 16\n"
" | byte_buffer[3] << 24;",
Style);
+
+ Style.BreakBinaryOperations = FormatStyle::BBO_OnePerLine;
+
@@ -28188,6 +28188,17 @@ TEST_F(FormatTest, BreakBinaryOperations) {
" | byte_buffer[2] << 16\n"
" | byte_buffer[3] << 24;",
Style);
owenca wrote:
```suggestion
Style
@@ -2252,6 +2252,25 @@ struct FormatStyle {
/// \version 16
BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon;
+ /// If ``true``, a line break will be placed before the ``>`` in a multiline
+ /// template declaration.
+ /// \code
+ ///true:
+ ///templat
owenca wrote:
Why doesn't it break before the `>` for the example (a.cc) below?
```cpp
template
class C {
void f() {}
};
```
Command line:
```
clang-format -style='{BreakBeforeTemplateCloser: Multiline, ColumnLimit: 26}'
a.cc
```
https://github.com/llvm/llvm-project/pull/118046
_
@@ -2252,6 +2252,25 @@ struct FormatStyle {
/// \version 16
BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon;
+ /// If ``true``, a line break will be placed before the ``>`` in a multiline
+ /// template declaration.
+ /// \code
+ ///true:
+ ///templat
@@ -2252,6 +2252,25 @@ struct FormatStyle {
/// \version 16
BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon;
+ /// If ``true``, a line break will be placed before the ``>`` in a multiline
+ /// template declaration.
+ /// \code
+ ///true:
+ ///templat
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> rebased but still required to be tested and fix again
See https://github.com/llvm/llvm-project/pull/93634#discussion_r1912374181.
https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
h
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/93634
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4493,13 +4493,11 @@ struct FormatStyle {
bool SpaceBeforeRangeBasedForLoopColon;
/// If ``true``, spaces will be inserted into ``{}``.
- /// \code
- ///true:false:
- ///void f() { } vs. void f() {}
- ///
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/118046
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6,6 +6,275 @@ TEST_F(FormatTest,
WrapsTemplateDeclarationsWithComments) {
Style);
}
+TEST_F(FormatTest, BreakBeforeTemplateClose) {
+ FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp);
+ // Begin with tests covering the case where there is no constra
@@ -2252,6 +2252,25 @@ struct FormatStyle {
/// \version 16
BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon;
+ /// If ``true``, a line break will be placed before the ``>`` in a multiline
+ /// template declaration.
+ /// \code
+ ///true:
+ ///templat
@@ -2252,6 +2252,25 @@ struct FormatStyle {
/// \version 16
BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon;
+ /// If ``true``, a line break will be placed before the ``>`` in a multiline
+ /// template declaration.
+ /// \code
+ ///true:
+ ///templat
https://github.com/owenca commented:
You can run `ninja clang-format-check-format` to make sure your patch is
correctly formatted before pushing.
https://github.com/llvm/llvm-project/pull/118046
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
owenca wrote:
> > I think this should be covered by BlockIndent
>
> My understanding from looking at past PRs to clang-format was that backwards
> compatibility was a top requirement. If I changed the behavior of BlockIndent
> to put the `>` on the next line, that would change a lot of existin
https://github.com/owenca commented:
With `ColumnLimit: 60`, this patch doesn't seem to format the following
correctly:
`std::cout << longOperand_1 << longOperand_2 << longOperand_3;`
https://github.com/llvm/llvm-project/pull/122282
___
cfe-commits m
@@ -28188,6 +28188,16 @@ TEST_F(FormatTest, BreakBinaryOperations) {
" | byte_buffer[2] << 16\n"
" | byte_buffer[3] << 24;",
Style);
+
+ Style.BreakBinaryOperations = FormatStyle::BBO_OnePerLine;
+
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/122282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca commented:
About the test cases:
- Call `verifyFormat` instead of `verifyNoChange` whenever possible.
- Don't end a test case with a newline. (Search for `\n",` and `\n")`.)
- Capitalize the first word of a comment and end the comment with a `.` (or `:`
if appropriate).
owenca wrote:
> > Maybe we should make it a sub-option for `BlockIndent`. I'm seeing a
> > possible need for having control over other kinds of block indented
> > structures such as Lambdas. I suspect the way this option has been
> > implemented it interacts with the alignment options anyway.
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/122234
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Owen Pan
Date: 2025-01-09T18:56:42-08:00
New Revision: f926bcf9068c808b643a56322b7ef6910eb36599
URL:
https://github.com/llvm/llvm-project/commit/f926bcf9068c808b643a56322b7ef6910eb36599
DIFF:
https://github.com/llvm/llvm-project/commit/f926bcf9068c808b643a56322b7ef6910eb36599.diff
LOG:
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/122234
Fixes #119790.
>From 38b8ebca922a7511d9f2bc048f3df0c9863cafc8 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 9 Jan 2025 00:16:30 -0800
Subject: [PATCH] [clang-format] Stop fixing indentation on namespace clo
Author: Owen Pan
Date: 2025-01-07T00:51:29-08:00
New Revision: 064da423c3b46907f5011a4537a88fbae9ac03d4
URL:
https://github.com/llvm/llvm-project/commit/064da423c3b46907f5011a4537a88fbae9ac03d4
DIFF:
https://github.com/llvm/llvm-project/commit/064da423c3b46907f5011a4537a88fbae9ac03d4.diff
LOG:
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/121681
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121681
>From 14e26d9bb27724705e51fc134a4f3df2a09807e6 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 4 Jan 2025 23:42:38 -0800
Subject: [PATCH 1/2] [clang-format] Add LT_RequiresExpression and
LT_SimpleRequirement
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/110381
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121681
>From 14e26d9bb27724705e51fc134a4f3df2a09807e6 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 4 Jan 2025 23:42:38 -0800
Subject: [PATCH] [clang-format] Add LT_RequiresExpression and
LT_SimpleRequirement
The
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/121681
The new line types help to annotate */&/&& in simple requirements as binary
operators.
Fixes #121675.
>From bdf0c2e2a9fd78368137e441cc4cad33702fbdc7 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 4 Jan 202
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/121539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/121622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/121626
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/121621
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/121451
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> these tests are so inconsistent but I guess it's not that critical
See the added commit message.
https://github.com/llvm/llvm-project/pull/121451
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/121451
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> This is a good fix but I think it might not be addressing the whole issue.
> This isn't a problem with just _compound-requirement_, it's the case for
> _simple-requirement_s too.
This patch fixes compound requirements as mentioned in the commit message and
reported in the GitH
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/121626
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/121626
Fixes #105658.
>From 6c95c2213467ad013406c7b8b9d9ff709a38e047 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 3 Jan 2025 22:35:38 -0800
Subject: [PATCH] [clang-format] Fix bug assuming short macro call withou
@@ -1022,7 +1028,10 @@ void WhitespaceManager::alignConsecutiveDeclarations() {
if (C.Tok->is(TT_FunctionDeclarationName))
return Style.AlignConsecutiveDeclarations.AlignFunctionDeclarations;
if (C.Tok->isNot(TT_StartOfName))
- return false;
+
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/109497
>From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001
From: Jesse Harvey
Date: Fri, 20 Sep 2024 16:40:35 -0700
Subject: [PATCH 1/4] Add support for aligning BlockComments in declarations
---
c
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/121622
For now, we only need to annotate the token after #error or #warning.
Fixes #117706.
>From 9daceef16b0a387257713d1a379782598d537fd9 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 3 Dec 2024 01:40:56 -0800
S
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/121621
None
>From 4c410b4f442e956f354f3e826d61733f85e8f390 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 30 Dec 2024 01:59:32 -0800
Subject: [PATCH] [clang-format][NFC] Replace SmallVectorImpl with ArrayRef
---
Author: Owen Pan
Date: 2025-01-03T20:10:33-08:00
New Revision: 34f0611bc36db40789823030a3748a8595198719
URL:
https://github.com/llvm/llvm-project/commit/34f0611bc36db40789823030a3748a8595198719
DIFF:
https://github.com/llvm/llvm-project/commit/34f0611bc36db40789823030a3748a8595198719.diff
LOG:
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/106145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/106145
>From dde31f15552cb4f95a50e0835238062a0e6c69d8 Mon Sep 17 00:00:00 2001
From: dmasloff
Date: Mon, 26 Aug 2024 22:11:05 +0300
Subject: [PATCH 01/12] fix merge conflict
---
clang/docs/ClangFormatStyleOptions.rst
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/106145
>From dde31f15552cb4f95a50e0835238062a0e6c69d8 Mon Sep 17 00:00:00 2001
From: dmasloff
Date: Mon, 26 Aug 2024 22:11:05 +0300
Subject: [PATCH 01/11] fix merge conflict
---
clang/docs/ClangFormatStyleOptions.rst
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/106145
>From dde31f15552cb4f95a50e0835238062a0e6c69d8 Mon Sep 17 00:00:00 2001
From: dmasloff
Date: Mon, 26 Aug 2024 22:11:05 +0300
Subject: [PATCH 01/10] fix merge conflict
---
clang/docs/ClangFormatStyleOptions.rst
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/106145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/121539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/121539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/121539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/121539
Also, add ST_CompoundRequirement so that */&/&& in compound requirement
expressions are annotated as PointerOrReference.
Fixes #121471.
>From 17c784954e9352738368adb29f85788b06e66b4d Mon Sep 17 00:00:00 2001
Fr
https://github.com/owenca commented:
Also, please address
https://github.com/llvm/llvm-project/pull/106145#pullrequestreview-2365418005.
https://github.com/llvm/llvm-project/pull/106145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
@@ -28427,6 +28427,136 @@ TEST_F(FormatTest, ShortNamespacesOption) {
Style);
}
+TEST_F(FormatTest, WrapNamespaceBodyWithEmptyLinesNever) {
+ auto Style = getLLVMStyle();
+ Style.FixNamespaceComments = false;
+ Style.WrapNamespaceBodyWithEmptyLines = FormatStyle::WNBW
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/106145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -28427,6 +28427,136 @@ TEST_F(FormatTest, ShortNamespacesOption) {
Style);
}
+TEST_F(FormatTest, WrapNamespaceBodyWithEmptyLinesNever) {
+ auto Style = getLLVMStyle();
+ Style.FixNamespaceComments = false;
+ Style.WrapNamespaceBodyWithEmptyLines = FormatStyle::WNBW
owenca wrote:
> > If we were to add // clang-format off-next-line, would "next line" mean the
> > next physical or logical/unwrapped line?
>
> I would expect it to apply only to the physical line, similar to how other
> formatters work. However, the main concern doesn’t seem to be about its
>
owenca wrote:
> > Should there be a parse test?
>
> About half of the `List of Strings` options don't have a `CHECK_PARSE` test.
> I'll fix that in a separate patch.
See #121451.
https://github.com/llvm/llvm-project/pull/121318
___
cfe-commits maili
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/121451
None
>From 305aacf68126a7827376a0718a774006f10879f4 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 1 Jan 2025 20:15:26 -0800
Subject: [PATCH] [clang-format][NFC] Add missing config tests for List of
Strings
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/121318
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
See #121318.
https://github.com/llvm/llvm-project/pull/120904
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> Should there be a parse test?
About half of the `List of Strings` options don't have a `CHECK_PARSE` test.
I'll fix that in a separate patch.
https://github.com/llvm/llvm-project/pull/121318
___
cfe-commits mailing list
cfe-commits@li
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121318
>From 7e865d66f147da3afa1ebcd55354e97fdfd8374a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 29 Dec 2024 20:17:46 -0800
Subject: [PATCH] [clang-format] Add VariableTemplate option
Closes #120148.
---
clang
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/121404
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121404
>From 36efaa2849ee6276be5b3c0739f295d0921d1e6e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 31 Dec 2024 08:13:53 -0800
Subject: [PATCH 1/4] [clang-format] Support globstar in .clang-format-ignore
Closes #1
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121404
>From 36efaa2849ee6276be5b3c0739f295d0921d1e6e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 31 Dec 2024 08:13:53 -0800
Subject: [PATCH 1/3] [clang-format] Support globstar in .clang-format-ignore
Closes #1
@@ -164,6 +164,41 @@ TEST_F(MatchFilePathTest, Path) {
EXPECT_FALSE(match("foo\\", R"(foo*\)"));
}
+TEST_F(MatchFilePathTest, Globstar) {
+ EXPECT_TRUE(match("/", "**"));
+ EXPECT_TRUE(match("foo", "**"));
+ EXPECT_TRUE(match("/foo", "**"));
+ EXPECT_TRUE(match("foo/", "
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/121404
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121404
>From 36efaa2849ee6276be5b3c0739f295d0921d1e6e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 31 Dec 2024 08:13:53 -0800
Subject: [PATCH 1/2] [clang-format] Support globstar in .clang-format-ignore
Closes #1
@@ -164,6 +164,41 @@ TEST_F(MatchFilePathTest, Path) {
EXPECT_FALSE(match("foo\\", R"(foo*\)"));
}
+TEST_F(MatchFilePathTest, Globstar) {
+ EXPECT_TRUE(match("/", "**"));
+ EXPECT_TRUE(match("foo", "**"));
+ EXPECT_TRUE(match("/foo", "**"));
+ EXPECT_TRUE(match("foo/", "
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121404
>From 36efaa2849ee6276be5b3c0739f295d0921d1e6e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 31 Dec 2024 08:13:53 -0800
Subject: [PATCH] [clang-format] Support globstar in .clang-format-ignore
Closes #11496
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121404
>From 13c13f02e55c39db1376c8e8cfb1d1ab90287502 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 31 Dec 2024 08:13:53 -0800
Subject: [PATCH] [clang-format] Support globstar in .clang-format-ignore
Closes #11496
owenca wrote:
See #121404.
https://github.com/llvm/llvm-project/pull/110560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121404
>From a1060e903d29340840cdd0a9cecf74269fc7c563 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 31 Dec 2024 08:13:53 -0800
Subject: [PATCH] [clang-format] Support globstar in .clang-format-ignore
Closes #11496
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/121404
Closes #114969.
>From 8b7802141853f77f3f074e6f41f416dfd25d90e4 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 31 Dec 2024 08:13:53 -0800
Subject: [PATCH] [clang-format] Support globstar in .clang-format-igno
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121318
>From 7e865d66f147da3afa1ebcd55354e97fdfd8374a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 29 Dec 2024 20:17:46 -0800
Subject: [PATCH] [clang-format] Add VariableTemplate option
Closes #120148.
---
clang
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121318
>From 7e865d66f147da3afa1ebcd55354e97fdfd8374a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 29 Dec 2024 20:17:46 -0800
Subject: [PATCH] [clang-format] Add VariableTemplate option
Closes #120148.
---
clang
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121318
>From abbe00e409219bcc3ce08c21548d809c9d5bea39 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 29 Dec 2024 20:17:46 -0800
Subject: [PATCH] [clang-format] Add VariableTemplate option
Closes #120148.
---
clang
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121318
>From abbe00e409219bcc3ce08c21548d809c9d5bea39 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 29 Dec 2024 20:17:46 -0800
Subject: [PATCH] [clang-format] Add VariableTemplate option
Closes #120148.
---
clang
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121318
>From 8f61998f9a5339a9c1c04176bf3d74331532eb75 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 29 Dec 2024 20:17:46 -0800
Subject: [PATCH] [clang-format] Add VariableTemplate option
Closes #120148.
---
clang
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/121318
>From 8f61998f9a5339a9c1c04176bf3d74331532eb75 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 29 Dec 2024 20:17:46 -0800
Subject: [PATCH] [clang-format] Add VariableTemplate option
Closes #120148.
---
clang
https://github.com/owenca requested changes to this pull request.
Please enable "Allowing edits by maintainers".
https://github.com/llvm/llvm-project/pull/106145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
@@ -1493,6 +1493,22 @@ static auto computeNewlines(const AnnotatedLine &Line,
Newlines = 1;
}
+ if (Style.WrapNamespaceBodyWithEmptyLines != FormatStyle::WNBWELS_Leave) {
+// Modify empty lines after TT_NamespaceLBrace.
+if (PreviousLine && PreviousLine->endsWit
@@ -28104,6 +28104,138 @@ TEST_F(FormatTest, BreakBinaryOperations) {
Style);
}
+TEST_F(FormatTest, WrapNamespaceBodyWithEmptyLinesNever) {
+ auto Style = getLLVMStyle();
+ Style.FixNamespaceComments = false;
+ Style.WrapNamespaceBodyWithEmptyLines = FormatSt
1 - 100 of 1725 matches
Mail list logo