https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/141714
>From 2d30adbd7bcce89c157e5b3eb517854cfbd35f48 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 27 May 2025 20:50:56 -0700
Subject: [PATCH] [clang-format] Handle .h files for LK_C and LK_ObjC
Fix #137792
---
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/141714
Fix #137792
>From 0afd41acb56fced29a7f8865b19cf2da95aaa26d Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 27 May 2025 20:50:56 -0700
Subject: [PATCH] [clang-format] Handle .h files for LK_C and LK_ObjC
Fix
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/141518
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick b7f5950bb3b97eac979925a3bbf015530c26962e
https://github.com/llvm/llvm-project/pull/141334
___
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/141334
___
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/141334
>From 470eca4b4d963bf5c1ba87fb2f22620eb717c848 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 23 May 2025 23:21:12 -0700
Subject: [PATCH 1/2] [clang-format] Handle Java text blocks
Fix #61954
---
clang/lib/
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/141334
>From 470eca4b4d963bf5c1ba87fb2f22620eb717c848 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 23 May 2025 23:21:12 -0700
Subject: [PATCH 1/2] [clang-format] Handle Java text blocks
Fix #61954
---
clang/lib/
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/141334
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
Should `Leave` apply to the hash only or also to the name after the hash?
https://github.com/llvm/llvm-project/pull/139750
___
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/141334
Fix #61954
>From 470eca4b4d963bf5c1ba87fb2f22620eb717c848 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 23 May 2025 23:21:12 -0700
Subject: [PATCH] [clang-format] Handle Java text blocks
Fix #61954
---
cl
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/141202
___
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/141202
None
>From 9f6342e8d20ebb7a55f77385f57ada832a69e441 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 22 May 2025 23:27:29 -0700
Subject: [PATCH] [clang-format][NFC] FormatTokenLexer.cpp cleanup
---
clang/lib
owenca wrote:
/cherry-pick 0dfdf7efbfe347517eb4c7f544043a71af4e4a25
https://github.com/llvm/llvm-project/pull/140666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/140666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick 6da2acf8e99ec517bfbe498af2519d29834e2583
https://github.com/llvm/llvm-project/pull/140366
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/140366
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick 0cac25bcf5a246eb8a1f02d5041731ae9a6f00e0
https://github.com/llvm/llvm-project/pull/140361
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/140361
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1892,6 +1892,9 @@ FormatStyle getChromiumStyle(FormatStyle::LanguageKind
Language) {
ChromiumStyle.IncludeStyle.IncludeBlocks =
tooling::IncludeStyle::IBS_Preserve;
+ ChromiumStyle.InsertBraces = true;
owenca wrote:
See https://reviews.llvm.org/
@@ -5904,7 +5904,7 @@ TEST_F(FormatTest, MacrosWithoutTrailingSemicolon) {
getLLVMStyleWithColumns(60));
verifyFormat("VISIT_GL_CALL(GenBuffers, void, (GLsizei n, GLuint* buffers), "
- "(n, buffers))",
+ "(n, buffers))\n",
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/140835
___
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/140835
None
>From ca6a78c3c078fca61fe5ae60566adc4bf17503d2 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 20 May 2025 19:45:15 -0700
Subject: [PATCH] [clang-format][NFC] Minor efficiency cleanup
---
clang/lib/For
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/140666
___
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/140666
>From 7c1c0d2ca413503d81cd71e6a005a608cdec479d Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 19 May 2025 20:18:53 -0700
Subject: [PATCH 1/2] [clang-format] Handle raw string literals containing JSON
code
F
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/140666
Fix #65400
>From 7c1c0d2ca413503d81cd71e6a005a608cdec479d Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 19 May 2025 20:18:53 -0700
Subject: [PATCH] [clang-format] Handle raw string literals containing JSON
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/140661
___
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/140661
None
>From 186ac09017c78cbff5a34a5b8768b6df5b8d0546 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 18 May 2025 23:23:04 -0700
Subject: [PATCH 1/2] [clang-format][NFC] Upgrade SortIncludes option to a
struct
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/140497
___
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/140361
___
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/140366
___
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/140497
This allows adding other suboptions e.g. IgnoreExtension in #137840.
>From 186ac09017c78cbff5a34a5b8768b6df5b8d0546 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 18 May 2025 23:23:04 -0700
Subject: [PATCH]
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/140366
Fix #62356
>From f8fb158f193d0064ca3c05c081f2f96d1f882c2c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 17 May 2025 02:39:51 -0700
Subject: [PATCH] [clang-format] Merge short inline function in macro
defin
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/140361
>From 0b1d1c67566371290715daf8c02a48262ab624ad Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 16 May 2025 22:50:35 -0700
Subject: [PATCH] [clang-format] Fix the indent of StartOfName after
AttributeMacro
Fi
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/140361
Fix #139510
>From f7528c42b4c1cce3a04722d2eadca3b81305cc5e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 16 May 2025 22:50:35 -0700
Subject: [PATCH] [clang-format] Fix the indent of StartOfName after
Attri
@@ -189,6 +189,13 @@ def main():
default=config.get("clangformat.style", None),
help="passed to clang-format",
),
+p.add_argument(
owenca wrote:
Please move this to just before `--force` to keep the options sorted. (We can
also move `-
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/137609
___
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/137609
___
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/137609
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -189,6 +189,13 @@ def main():
default=config.get("clangformat.style", None),
help="passed to clang-format",
),
+p.add_argument(
+"--fallback-style",
+help="The name of the predefined style used as a "
+"fallback in case clang-f
@@ -3221,15 +3223,33 @@ static void sortCppIncludes(const FormatStyle &Style,
stable_sort(Indices, [&](unsigned LHSI, unsigned RHSI) {
const auto LHSFilenameLower = Includes[LHSI].Filename.lower();
const auto RHSFilenameLower = Includes[RHSI].Filename.lower();
-
@@ -3221,15 +3223,33 @@ static void sortCppIncludes(const FormatStyle &Style,
stable_sort(Indices, [&](unsigned LHSI, unsigned RHSI) {
const auto LHSFilenameLower = Includes[LHSI].Filename.lower();
const auto RHSFilenameLower = Includes[RHSI].Filename.lower();
-
@@ -3221,15 +3223,33 @@ static void sortCppIncludes(const FormatStyle &Style,
stable_sort(Indices, [&](unsigned LHSI, unsigned RHSI) {
const auto LHSFilenameLower = Includes[LHSI].Filename.lower();
const auto RHSFilenameLower = Includes[RHSI].Filename.lower();
-
@@ -4226,6 +4226,19 @@ the configuration (without a prefix: ``Auto``).
``ClassImpl.hpp`` would not have the main include file put on top
before any other include.
+.. _IncludeSortKey:
+
+**IncludeSortKey** (``IncludeSortKeyDiscriminator``)
:versionbadge:`clang-format 20`
@@ -293,15 +293,14 @@ class LineJoiner {
auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine,
TheLine]() {
- if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All)
+ if (Style.AllowShortFunctionsO
@@ -619,20 +619,39 @@ TEST(ConfigParseTest, ParsesConfiguration) {
CHECK_PARSE("AllowShortBlocksOnASingleLine: true",
AllowShortBlocksOnASingleLine, FormatStyle::SBS_Always);
- Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
CHECK_PARSE("A
@@ -622,15 +622,38 @@ template <> struct
ScalarEnumerationTraits {
}
};
-template <> struct ScalarEnumerationTraits {
- static void enumeration(IO &IO, FormatStyle::ShortFunctionStyle &Value) {
-IO.enumCase(Value, "None", FormatStyle::SFS_None);
-IO.enumCase(Value,
@@ -1500,7 +1523,10 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind
Language) {
LLVMStyle.AllowShortCaseLabelsOnASingleLine = false;
LLVMStyle.AllowShortCompoundRequirementOnASingleLine = true;
LLVMStyle.AllowShortEnumsOnASingleLine = true;
- LLVMStyle.AllowShortF
@@ -73,3 +73,4 @@ pythonenv*
/clang/utils/analyzer/projects/*/RefScanBuildResults
# automodapi puts generated documentation files here.
/lldb/docs/python_api/
+clang-build/
owenca wrote:
Why this?
https://github.com/llvm/llvm-project/pull/134337
_
owenca wrote:
I would expect that file extensions be sorted regardless. For example:
```
#include "a.h"
#include "a.inc"
#include "a-util.def"
#include "a-util.h"
```
https://github.com/llvm/llvm-project/pull/137840
___
cfe-commits mailing list
cfe-com
@@ -291,54 +291,59 @@ class LineJoiner {
auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine,
TheLine]() {
- if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All)
+ if (Style.AllowShortFunctionsO
@@ -5685,11 +5685,27 @@ bool TokenAnnotator::mustBreakBefore(const
AnnotatedLine &Line,
if (Right.is(tok::r_brace) && Left.is(tok::l_brace) &&
!Left.Children.empty()) {
// Support AllowShortFunctionsOnASingleLine for JavaScript.
- return Style.AllowShort
https://github.com/owenca commented:
If there are any new test cases including those for only `Other == true`, can
you move them to a future patch?
https://github.com/llvm/llvm-project/pull/134337
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/134337
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> @owenca, I actually think that this introduced a regression that was
> previously fixed in the nightly snapshot of `clang-format-21`.
It was an incidental "fix" by 91328dbae986dfa93cf2acef0a93361fd5ced66d, which
caused a regression that's fixed by this patch.
> ```
> $ cat foo
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/139199
___
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/139215
___
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/139215
Fix #62089
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,A
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/139199
None
>From 8ff5e366318162dc4e429abd8e41c339ba22ed41 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 8 May 2025 19:59:20 -0700
Subject: [PATCH] [clang-format][NFC] Delete duplicates in CSharpExtraKeywords
---
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/139034
>From 11a3f6f44914e40b49f9ce00256724ce1fb82fa1 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 8 May 2025 00:12:44 -0700
Subject: [PATCH 1/2] [clang-format] Handle C# where clause in
SeparateDefinitionBlocks
@@ -137,6 +137,12 @@ void DefinitionBlockSeparator::separateBlocks(
const auto MayPrecedeDefinition = [&](const int Direction = -1) {
assert(Direction >= -1);
assert(Direction <= 1);
+
+ if (Style.isCSharp() &&
+ Lines[OpeningLineIndex]->First->is(
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/139034
Fix #61956
>From 11a3f6f44914e40b49f9ce00256724ce1fb82fa1 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 8 May 2025 00:12:44 -0700
Subject: [PATCH] [clang-format] Handle C# where clause in
SeparateDefinitio
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/137610
___
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/138799
___
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/138799
Fix #138484
>From ec9f832cedf7abd4d90d8cf3dca45ee128b922a9 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 6 May 2025 20:13:26 -0700
Subject: [PATCH] [clang-format] Correctly annotate ObjC `* __autoreleasing
owenca wrote:
> > 3. File has been formatted with clang-format, except for the grammar,
> > because clang-format butchers it.
>
> Yeah, this problem comes up rather frequently, I wonder if clang-format can
> get some additional smarts to make that less of a challenge? CC
> @mydeveloperday @ow
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/137610
___
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/138440
>From 90803c382ecb040e016034d5798d739739ece03a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 3 May 2025 23:38:18 -0700
Subject: [PATCH 1/4] [clang-format] Don't annotate enum colon as
InheritanceColon
Fix
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/138440
>From 90803c382ecb040e016034d5798d739739ece03a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 3 May 2025 23:38:18 -0700
Subject: [PATCH 1/3] [clang-format] Don't annotate enum colon as
InheritanceColon
Fix
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/138633
Fix #138485
>From e72f081f3a1f06ec9e868042cbe7db0a3c18796d Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 5 May 2025 22:35:40 -0700
Subject: [PATCH] [clang-format] Fix a bug in annotating binary operator &&
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/138631
Fix #78666
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,A
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/138440
>From 90803c382ecb040e016034d5798d739739ece03a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 3 May 2025 23:38:18 -0700
Subject: [PATCH 1/2] [clang-format] Don't annotate enum colon as
InheritanceColon
Fix
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/138440
Fix #61156
>From 90803c382ecb040e016034d5798d739739ece03a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 3 May 2025 23:38:18 -0700
Subject: [PATCH] [clang-format] Don't annotate enum colon as InheritanceColo
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/138389
___
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/138389
Fix #138382
>From 36e7e2002439dcdb084e949a265a280551597800 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 3 May 2025 01:21:03 -0700
Subject: [PATCH] [clang-format] Correctly annotate tok::star in braced list
https://github.com/owenca demilestoned
https://github.com/llvm/llvm-project/pull/138229
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/138229
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca demilestoned
https://github.com/llvm/llvm-project/pull/138229
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick d3506ee573a2aa1403817642ef45f8c0305bb572
https://github.com/llvm/llvm-project/pull/138229
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/138229
___
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/138230
___
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/138229
___
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/138230
Fix #138097
>From 3c10436ed455de5c2046b259c0c75744a75e1e4a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 1 May 2025 21:20:34 -0700
Subject: [PATCH] [clang-format] Fix a crash on formatting missing
r_paren/
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/138229
Fix #138124
>From 9ba504b25f9afa79a155004c635d618a141c8c39 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 1 May 2025 21:07:39 -0700
Subject: [PATCH] [clang-format] RemoveParentheses shouldn't remove empty
p
owenca wrote:
@rnk see
https://github.com/llvm/llvm-project/pull/137577#issuecomment-2843963228 for
some of the bots that got the assertion failure.
> Update: Back to normal after
> [afd738c](https://github.com/llvm/llvm-project/commit/afd738cd9016ddef4e26b309770ba35fd017a178).
I meant the
https://github.com/owenca commented:
You need to run `ninja clang-format-style` to update the documentation.
https://github.com/llvm/llvm-project/pull/108332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
owenca wrote:
> > > > I prefer that we limit this to breaking after the left parenthesis of a
> > > > control statement, with true/false or Always, Never, Multiline,
> > > > BlockIndent, etc.
> > >
> > >
> > > if I understand you correctly, you would like a new style option added
> > > for s
owenca wrote:
Please add a description so that we'll understand why you need this new option.
https://github.com/llvm/llvm-project/pull/137609
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
@@ -9694,6 +9694,304 @@ TEST_F(FormatTest, ParenthesesAndOperandAlignment) {
Style);
}
+TEST_F(FormatTest, AlignAfterConditionalStatements) {
owenca wrote:
```suggestion
TEST_F(FormatTest, AlignAfterControlStatements) {
```
Can you move this to
owenca wrote:
IMO, unless it's a bug, we need a new option to ensure it's a non-breaking
change.
https://github.com/llvm/llvm-project/pull/137840
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
owenca wrote:
I don't like new options for bug fixes. WDYT @mydeveloperday?
https://github.com/llvm/llvm-project/pull/137544
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -62,6 +62,22 @@ struct FormatStyle {
/// \version 3.3
int AccessModifierOffset;
+ /// Different styles for breaking the parenthesis after a control statement
+ /// (``if/switch/while/for ...``).
+ /// \version 21
+ enum BreakAfterControlStatementStyle : int8_t {
+
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/108332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> When I updated, my build target for `FormatTests` stopped working.
>
> ```
> ninja -C build clang-format FormatTests
> ninja: Entering directory `build'
> ninja: error: unknown target 'FormatTests'
> ```
>
> I'm trying to figure out what changed or how to modify my workflow. I t
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/137914
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Owen Pan
Date: 2025-04-30T19:58:59-07:00
New Revision: 8effc8da292bfacb823a7e3c4134296da481fedc
URL:
https://github.com/llvm/llvm-project/commit/8effc8da292bfacb823a7e3c4134296da481fedc
DIFF:
https://github.com/llvm/llvm-project/commit/8effc8da292bfacb823a7e3c4134296da481fedc.diff
LOG:
owenca wrote:
> > @dyung I don't see anything in this patch could cause a failure in CodGen
> > tests. Have you verified it e.g. by running the tests on
> > [f175030](https://github.com/llvm/llvm-project/commit/f1750300aad0e49383cd4b206e2354f1300a40a8)?
>
> It seems several of the listed faili
https://github.com/owenca commented:
Please also update the release notes.
https://github.com/llvm/llvm-project/pull/137610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -17630,6 +17630,10 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
verifyFormat("int x = int (y);", SomeSpace2);
verifyFormat("auto lambda = []() { return 0; };", SomeSpace2);
+ FormatStyle SpaceAfterOperatorKeyword = getLLVMStyle();
+ SpaceAfterOperatorKeyword
@@ -4463,6 +4463,14 @@ struct FormatStyle {
/// \version 9
bool SpaceAfterLogicalNot;
+ /// If \c true, a space will be inserted after the ``operator`` keyword.
+ /// \code
+ ///true:false:
+ ///bool operator == (int a) vs.
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/137610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 2018 matches
Mail list logo