@@ -76,40 +76,49 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
+
@@ -76,40 +76,49 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
+
@@ -76,40 +76,49 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
+
https://github.com/owenca commented:
Please also update the release notes. LGTM otherwise.
https://github.com/llvm/llvm-project/pull/69340
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
owenca wrote:
> @owenca this waits for re-review
Can you rebase the patch?
https://github.com/llvm/llvm-project/pull/69340
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2499,6 +2499,15 @@ TEST_F(TokenAnnotatorTest, BraceKind) {
EXPECT_BRACE_KIND(Tokens[6], BK_Block);
}
+TEST_F(TokenAnnotatorTest, StreamOperator) {
+ auto Tokens = annotate("\"foo\\n\" << aux << \"foo\\n\" << \"foo\";");
+ ASSERT_EQ(Tokens.size(), 9u) << Tokens;
+
@@ -5151,6 +5151,14 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine
,
return true;
if (Left.IsUnterminatedLiteral)
return true;
+ // FIXME: Breaking after newlines seems useful in general. Turn this into an
+ // option and recognize more cases like
@@ -2499,6 +2499,15 @@ TEST_F(TokenAnnotatorTest, BraceKind) {
EXPECT_BRACE_KIND(Tokens[6], BK_Block);
}
+TEST_F(TokenAnnotatorTest, StreamOperator) {
+ auto Tokens = annotate("\"foo\\n\" << aux << \"foo\\n\" << \"foo\";");
+ ASSERT_EQ(Tokens.size(), 9u) << Tokens;
+
@@ -5151,6 +5151,14 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine
,
return true;
if (Left.IsUnterminatedLiteral)
return true;
+ // FIXME: Breaking after newlines seems useful in general. Turn this into an
+ // option and Recognize more cases like
@@ -1444,7 +1444,8 @@ WhitespaceManager::CellDescriptions
WhitespaceManager::getCells(unsigned Start,
} else if (C.Tok->is(tok::comma)) {
if (!Cells.empty())
Cells.back().EndIndex = i;
-if (C.Tok->getNextNonComment()->isNot(tok::r_brace)) //
@@ -21084,6 +21084,12 @@ TEST_F(FormatTest,
CatchAlignArrayOfStructuresLeftAlignment) {
"};",
Style);
+ verifyNoCrash("Foo f[] = {\n"
+"[0] = { 1, },\n"
+"[1] { 1, },\n"
+"};",
+Style);
owenca wrote:
Actually, it's commit 42ec976184ac. Please see
[here](https://github.com/llvm/llvm-project/pull/76733#issuecomment-1876707005).
https://github.com/llvm/llvm-project/pull/76327
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
owenca wrote:
It had passed my local tests (x64 Native Tools Command Prompt for VS 2022) and
the buildkite win build, so I wonder if it has something to do with the grep in
the failed buildbot (only
https://lab.llvm.org/buildbot/#/builders/123/builds/23808 so far) as I only
used the POSIX
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/76733
___
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/76733
>From 7f8da18dc59706df8f1ee15d22076b4794881579 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 1 Jan 2024 19:10:30 -0800
Subject: [PATCH 1/2] [clang-format] Optimize processing .clang-format-ignore
files
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/76733
___
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/76733
Reuse the patterns governing the previous input file being formatted if the the
current input file is from the same directory.
>From 7f8da18dc59706df8f1ee15d22076b4794881579 Mon Sep 17 00:00:00 2001
From: Owen
@@ -2919,6 +2912,12 @@ class ExpressionParser {
void addFakeParenthesis(FormatToken *Start, prec::Level Precedence,
FormatToken *End = nullptr) {
+// Do not assign fake parenthesis to tokens that are part of an
+// unexpanded macro call.
@@ -255,6 +255,44 @@ TEST_F(FormatTestMacroExpansion,
Style);
}
+TEST_F(FormatTestMacroExpansion, CommaAsOperator) {
+ FormatStyle Style = getGoogleStyle();
+ Style.Macros.push_back("ASSIGN_OR_RETURN(a, b, c)=a=(b); if(x) c");
+
@@ -255,6 +255,44 @@ TEST_F(FormatTestMacroExpansion,
Style);
}
+TEST_F(FormatTestMacroExpansion, CommaAsOperator) {
+ FormatStyle Style = getGoogleStyle();
+ Style.Macros.push_back("ASSIGN_OR_RETURN(a, b, c)=a=(b); if(x) c");
+
@@ -416,10 +421,15 @@ struct FormatToken {
/// to another one please use overwriteFixedType, or even better remove the
/// need to reassign the type.
void setFinalizedType(TokenType T) {
+if (MacroCtx && MacroCtx->Role == MR_UnexpandedArg)
+ return;
+
Author: Owen Pan
Date: 2023-12-30T01:32:10-08:00
New Revision: bd3d358ec68f686a280ae628f9074fdff1f10fe9
URL:
https://github.com/llvm/llvm-project/commit/bd3d358ec68f686a280ae628f9074fdff1f10fe9
DIFF:
https://github.com/llvm/llvm-project/commit/bd3d358ec68f686a280ae628f9074fdff1f10fe9.diff
Author: Owen Pan
Date: 2023-12-29T23:12:16-08:00
New Revision: fe2e677aa7aebedd316b1a688db8410855a213c1
URL:
https://github.com/llvm/llvm-project/commit/fe2e677aa7aebedd316b1a688db8410855a213c1
DIFF:
https://github.com/llvm/llvm-project/commit/fe2e677aa7aebedd316b1a688db8410855a213c1.diff
Author: Owen Pan
Date: 2023-12-29T22:52:07-08:00
New Revision: 3507959e441ed9470818e7c6ef16d9bbcfe6a999
URL:
https://github.com/llvm/llvm-project/commit/3507959e441ed9470818e7c6ef16d9bbcfe6a999
DIFF:
https://github.com/llvm/llvm-project/commit/3507959e441ed9470818e7c6ef16d9bbcfe6a999.diff
Author: Owen Pan
Date: 2023-12-29T19:47:08-08:00
New Revision: ca8441d6dbd36003288ef412295e7b946a8bb893
URL:
https://github.com/llvm/llvm-project/commit/ca8441d6dbd36003288ef412295e7b946a8bb893
DIFF:
https://github.com/llvm/llvm-project/commit/ca8441d6dbd36003288ef412295e7b946a8bb893.diff
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/76327
___
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/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/9] [clang-format] Add .clang-format.ignore for ignoring
files
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/8] [clang-format] Add .clang-format.ignore for ignoring
files
@@ -570,6 +571,70 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are
@@ -570,6 +571,70 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/76336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -26492,6 +26492,10 @@ TEST_F(FormatTest, BreakAfterAttributes) {
verifyFormat("[[nodiscard]]\n"
"Foo& operator-(Foo&);",
Style);
+
+ verifyFormat("[[maybe_unused]]\n"
+ "foo f;",
owenca wrote:
```suggestion
@@ -26492,6 +26492,10 @@ TEST_F(FormatTest, BreakAfterAttributes) {
verifyFormat("[[nodiscard]]\n"
"Foo& operator-(Foo&);",
Style);
+
+ verifyFormat("[[maybe_unused]]\n"
+ "foo f;",
+ Style);
owenca
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/7] [clang-format] Add .clang-format.ignore for ignoring
files
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/76327
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/6] [clang-format] Add .clang-format.ignore for ignoring
files
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/5] [clang-format] Add .clang-format.ignore for ignoring
files
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/4] [clang-format] Add .clang-format.ignore for ignoring
files
@@ -0,0 +1,31 @@
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/level1/level2
+
+// RUN: cd %t.dir
+// RUN: printf "%%s\n" "\*" "level*/*.c*" "*/*2/foo.*" > .clang-format-ignore
owenca wrote:
```suggestion
// RUN: echo "*" > .clang-format-ignore
// RUN: echo
@@ -0,0 +1,31 @@
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/level1/level2
+
+// RUN: cd %t.dir
+// RUN: printf "%%s\n" "\*" "level*/*.c*" "*/*2/foo.*" > .clang-format-ignore
+// RUN: touch foo.cc
+// RUN: clang-format -verbose .clang-format-ignore foo.cc 2> %t.stderr
+//
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/3] [clang-format] Add .clang-format.ignore for ignoring
files
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/2] [clang-format] Add .clang-format.ignore for ignoring
files
@@ -131,6 +131,24 @@ An easy way to create the ``.clang-format`` file is:
Available style options are described in :doc:`ClangFormatStyleOptions`.
+You can create ``.clang-format-ignore`` files to make ``clang-format`` ignore
+certain files. A ``.clang-format-ignore`` file
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/76327
Closes #52975.
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH] [clang-format] Add .clang-format.ignore for ignoring
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/76021
___
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/76021
>From 4954f52278ca41652be79318843d3538a2eb1205 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 19 Dec 2023 23:25:57 -0800
Subject: [PATCH 1/3] [clang-format] Add an fnmatch-like function for
@@ -0,0 +1,121 @@
+//===--- MatchFilePath.cpp - Match file path with pattern ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
owenca wrote:
> This regressions was introduced in
> [70d7ea0](https://github.com/llvm/llvm-project/commit/70d7ea0cebcf363cd0ddcfb76375fb5fada87dd5).
> The commit moved some code and correctly picked up an explicit check for not
> running on Verilog. However, the moved code also never ran for
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 closed https://github.com/llvm/llvm-project/pull/76206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> `GUARDED_BY` and `ABSL_GUARDED_BY` are very commoon in Google codebases so it
> is reasonable to include them by default to avoid the need for extra
> configuration in every Google repository.
I don't feel comfortable with this as it might impact users of the Google style
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
@@ -26451,6 +26451,20 @@ TEST_F(FormatTest, BreakAfterAttributes) {
"{\n"
"}",
CtorDtorCode, Style);
+
+ Style.BreakBeforeBraces = FormatStyle::BS_Attach;
+ Style.ReferenceAlignment =
owenca wrote:
> Are we going to use this specific implementation on all platforms for parity?
Yes, similar to
[this](https://github.com/owenca/llvm-project/commit/52866dcfe31cf5a43d86b27ec1f0420077034780#diff-0cfce704bac218438436bd4388319d112780509ea474d5b3253d45746a62713aR123).
> The logic
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76021
>From 4954f52278ca41652be79318843d3538a2eb1205 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 19 Dec 2023 23:25:57 -0800
Subject: [PATCH 1/2] [clang-format] Add an fnmatch-like function for
@@ -0,0 +1,169 @@
+//===- unittest/Format/MatchFilePathTest.cpp
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -583,20 +583,26 @@ bool ContinuationIndenter::mustBreak(const LineState
) {
return true;
}
- // If the return type spans multiple lines, wrap before the function name.
- if (((Current.is(TT_FunctionDeclarationName) &&
-!State.Line->ReturnTypeWrapped &&
-
owenca wrote:
See
[here](https://discourse.llvm.org/t/why-are-the-breaks-sometimes-removed-when-alwaysbreakafterreturntype-is-all/75780/4?u=owenpan)
for background info.
https://github.com/llvm/llvm-project/pull/76206
___
cfe-commits mailing list
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/76206
Annotates function declaration names having unnamed parameters.
>From 170d2e573904286ae6ee8fad9df6ea467eb54eb8 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 21 Dec 2023 21:27:47 -0800
Subject: [PATCH]
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76021
>From 4954f52278ca41652be79318843d3538a2eb1205 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 19 Dec 2023 23:25:57 -0800
Subject: [PATCH] [clang-format] Add an fnmatch-like function for
.clang-format-ignore
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76021
>From ea6418158c00b7b4ceb7a3192917ed009550ed11 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 19 Dec 2023 23:25:57 -0800
Subject: [PATCH] [clang-format] Add an fnmatch-like function for
.clang-format-ignore
owenca wrote:
> I avoid this by using clang-format binary from main branch in my local. What
> should I do with this failure?
You can ignore it if running the in-tree clang-format is clean, e.g.:
```
$ clang/tools/clang-format/git-clang-format --binary build/bin/clang-format
HEAD~
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76021
>From d3c7a45cfcd16974cdfd88d1f5381fc0f96184a1 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 19 Dec 2023 23:25:57 -0800
Subject: [PATCH] [clang-format] Add an fnmatch-like function for
.clang-format-ignore
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/76021
This is needed because Windows doesn't have anything equivalent to the POSIX
fnmatch() function.
>From b53c8b6c6d34857168d868d99c8d7ea7a69621eb Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 19 Dec 2023
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/75731
___
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/75731
Fixes #36620.
Fixes #75719.
>From 9e54c990db8e597a85239b1efea06b597acf6beb Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 16 Dec 2023 22:50:27 -0800
Subject: [PATCH] [clang-format] Fix a bug in
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/75268
___
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/75144
___
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/75144
___
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/75144
___
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/75144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -298,6 +298,17 @@ TEST_F(TokenAnnotatorTest, UnderstandsUsesOfStarAndAmp) {
ASSERT_EQ(Tokens.size(), 12u) << Tokens;
EXPECT_TOKEN(Tokens[2], tok::identifier, TT_TypeName);
EXPECT_TOKEN(Tokens[3], tok::star, TT_PointerOrReference);
+
+ Tokens = annotate("class Foo
@@ -11727,6 +11727,13 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
" void func(type ) { a & member; }\n"
" anotherType \n"
"}");
+
+ Style.ReferenceAlignment = FormatStyle::RAS_Left;
+ verifyFormat("class Foo {\n"
+
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/75144
___
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/75144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -164,6 +167,12 @@ class AnnotatingParser {
TT_OverloadedOperatorLParen))) {
return false;
}
+ FormatToken *ClosingParen = nullptr;
+ if (Previous.Previous->is(tok::kw_operator) &&
+ isFunctionDeclarationName(Style.isCpp(),
owenca wrote:
See #75268.
https://github.com/llvm/llvm-project/pull/69228
___
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/75268
Pass the fully-qualified path name (less the file extension) of
git-clang-format.bat to py so that it can be run from anywhere.
Fixes #75265.
>From 1eb01de0a5bcd20c903348ecccbc559751d97be5 Mon Sep 17 00:00:00
@@ -0,0 +1 @@
+py -3 git-clang-format %*
owenca wrote:
@llvm-beanz This doesn't seem to work if `git-clang-format` is run from another
directory:
```
C:\Users\Owen\llvm-project>clang\tools\clang-format\git-clang-format
C:\Users\Owen\llvm-project>py -3
owenca wrote:
Running the in-tree clang-format on the changed files in clang/lib/Format
passed, so that part LGTM.
https://github.com/llvm/llvm-project/pull/75149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74794
___
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/74794
None
>From fb239719267ec97905ebb339176b5f7015de04eb Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 7 Dec 2023 17:42:45 -0800
Subject: [PATCH] [clang-format][NFC] Clean up ClangFormat.cpp and getStyle()
in
Author: Owen Pan
Date: 2023-12-06T17:40:41-08:00
New Revision: b683709ea6eec7d0a388bd50c571774c9b9ffdb7
URL:
https://github.com/llvm/llvm-project/commit/b683709ea6eec7d0a388bd50c571774c9b9ffdb7
DIFF:
https://github.com/llvm/llvm-project/commit/b683709ea6eec7d0a388bd50c571774c9b9ffdb7.diff
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -411,9 +411,16 @@ class LineJoiner {
}
}
+const auto *LastNonComment = TheLine->getLastNonComment();
+assert(LastNonComment);
+// FIXME: There are probably cases where we should use LastNonComment
owenca wrote:
No. This is new from
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/74651
Fixed #41854.
>From 40859e0887fd53bbb02be213fcacf3d6d1a5a487 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 6 Dec 2023 12:01:19 -0800
Subject: [PATCH] [clang-format] Handle merging functions containing only
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74570
___
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/74570
None
>From a37925ae51d95e91d32ec50bc39a9b6e5b13c571 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Tue, 5 Dec 2023 23:31:28 -0800
Subject: [PATCH] [clang-format][NFC] Refactor getting first/last non-comment
of
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/74230
___
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/74230
>From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001
From: Aiden Grossman
Date: Sat, 2 Dec 2023 23:46:58 -0800
Subject: [PATCH 1/3] [clang-format] Add "three dot" diff option to
owenca wrote:
> You can remove the useless `import os` then :-)
Good catch!
https://github.com/llvm/llvm-project/pull/74399
___
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/74399
>From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 4 Dec 2023 17:33:47 -0800
Subject: [PATCH 1/3] [clang-format][NFC] Use `prog` in clang-format-diff.py
This is a
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/74399
>From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 4 Dec 2023 17:33:47 -0800
Subject: [PATCH 1/2] [clang-format][NFC] Use `prog` in clang-format-diff.py
This is a
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/74399
This is a minor improvement to #73491.
>From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 4 Dec 2023 17:33:47 -0800
Subject: [PATCH] [clang-format][NFC] Use `prog`
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74235
___
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/74293
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -328,6 +337,10 @@ def compute_diff(commits, files, staged):
git_tool = 'diff-tree'
elif staged:
extra_args += ['--cached']
+
+ if len(commits) > 1 and diff_common_commit:
+commits = [f'{commits[0]}...{commits[1]}']
owenca wrote:
501 - 600 of 1116 matches
Mail list logo