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:
@@ -153,8 +157,13 @@ def main():
else:
if len(commits) > 2:
die('at most two commits allowed; %d given' % len(commits))
+ if len(commits) < 2 and opts.diff_from_common_commit:
+die('--diff_from_common_commit is only allowed when two commits are given')
https://github.com/owenca edited 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
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/74293
>From a394ac020c1045705fb2898d32754bdf12fac4bd Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 4 Dec 2023 01:03:18 -0800
Subject: [PATCH] [clang-format] Fix a bug in `git-clang-format --binary`
This is a
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/74293
This is a rework of #74176.
>From fddf15404c0f5de2d9b264413b94d45a4a73edde Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 4 Dec 2023 01:03:18 -0800
Subject: [PATCH] [clang-format] Fix a bug in
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/74235
>From 7323d9261fe8c876fe3a656a98e186af3dd0b2a0 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 3 Dec 2023 01:41:57 -0800
Subject: [PATCH 1/2] [clang-format] Remove duplicates in @property using
std::set
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74176
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
@jaredgrubb I can't add you to Reviewers. Maybe you can add yourself?
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 created
https://github.com/llvm/llvm-project/pull/74235
Re-implement ObjCPropertyAttributeOrder using std::set for sorting and removing
duplicates. (We can't use llvm::SmallSet because it's unordered.)
>From 7323d9261fe8c876fe3a656a98e186af3dd0b2a0 Mon Sep 17
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/74176
Fixed #74165.
>From 462a93a59b236fd6f6750ed69c8629db12cd32a9 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 1 Dec 2023 18:31:05 -0800
Subject: [PATCH] [clang-format] Fix a bug in `git-clang-format --binary`
Author: Jared Grubb
Date: 2023-12-01T17:41:30-08:00
New Revision: c45a66ecd4cb8f351298ca987d6086cf02b77bfb
URL:
https://github.com/llvm/llvm-project/commit/c45a66ecd4cb8f351298ca987d6086cf02b77bfb
DIFF:
https://github.com/llvm/llvm-project/commit/c45a66ecd4cb8f351298ca987d6086cf02b77bfb.diff
Author: Owen Pan
Date: 2023-11-30T20:19:30-08:00
New Revision: 5c60e2ce78e79c2d15152e08d9e28fcf3a1d4e51
URL:
https://github.com/llvm/llvm-project/commit/5c60e2ce78e79c2d15152e08d9e28fcf3a1d4e51
DIFF:
https://github.com/llvm/llvm-project/commit/5c60e2ce78e79c2d15152e08d9e28fcf3a1d4e51.diff
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/73886
___
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/73886
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1851,6 +1851,22 @@ TEST_F(TokenAnnotatorTest,
UnderstandsTrailingReturnArrow) {
EXPECT_TOKEN(Tokens[13], tok::arrow, TT_Unknown);
}
+TEST_F(TokenAnnotatorTest, UnderstandHashInMacro) {
+ auto Tokens = annotate("#define Foo(Bar) \\\n"
+ " {
@@ -1851,6 +1851,22 @@ TEST_F(TokenAnnotatorTest,
UnderstandsTrailingReturnArrow) {
EXPECT_TOKEN(Tokens[13], tok::arrow, TT_Unknown);
}
+TEST_F(TokenAnnotatorTest, UnderstandHashInMacro) {
+ auto Tokens = annotate("#define Foo(Bar) \\\n"
+ " {
@@ -496,7 +496,7 @@ void UnwrappedLineParser::calculateBraceTypes(bool
ExpectClassBody) {
do {
NextTok = Tokens->getNextToken();
} while (NextTok->is(tok::comment));
-while (NextTok->is(tok::hash)) {
+while (NextTok->is(tok::hash) &&
@@ -1157,7 +1157,15 @@ void UnwrappedLineParser::parsePPDefine() {
// guard processing above, and changes preprocessing nesting.
FormatTok->Tok.setKind(tok::identifier);
FormatTok->Tok.setIdentifierInfo(Keywords.kw_internal_ident_after_define);
- nextToken();
+
+ if
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/73753
___
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/73582
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1464,6 +1467,21 @@ class AnnotatingParser {
}
}
+ void parseEmbedDirective() {
+if (CurrentToken && CurrentToken->is(tok::less)) {
+ next();
+ while (CurrentToken) {
+// Mark tokens up to the trailing line comments as implicit string
+
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/73753
___
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/73753
___
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/73753
___
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/73753
This would also fix the overlapping replacements below: $ clang-format
a(
#else
#endif
) = []() {
)}
The new replacement overlaps with an existing replacement. New replacement:
: 38:+7:"
"
Existing
owenca wrote:
This patch makes `isProto()` a convenience function like `isCpp()`, which
doesn't prevent us from handling C++ and Objective-C separately when needed.
Although `LK_TextProto` is not always formatted like `LK_Proto`, it's frequent
enough (about 16 times in the codebase) that we
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/73491
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
Please open a github issue to show us what you are trying to accomplish and
reference the issue number here.
https://github.com/llvm/llvm-project/pull/73491
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/73582
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
See below. Seems it's already working as expected without this patch.
```
$ clang-format -version
clang-format version 17.0.5
$ clang-format-diff.py foo
usage: clang-format-diff.py [-h] [-i] [-p NUM] [-regex PATTERN] [-iregex
PATTERN]
[-sort-includes]
owenca wrote:
The default value of `BreakAfterAttributes` was changed to `Leave` in #70360.
You need to set it to `Never` or `Always` for the example above.
https://github.com/llvm/llvm-project/pull/71935
___
cfe-commits mailing list
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/73582
None
>From f98e8cfa7e4d77ed554a249f65caa88a696f5318 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 27 Nov 2023 14:35:22 -0800
Subject: [PATCH] [clang-format][NFC] Add isProto() and rename old one to
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/73432
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> > After giving more thoughts to this, I think what we really want is
> > `SkipMacroDefinitionBody`, which would format the code below:
> > (...)
> > That is, only the body (except comments) of a macro definition is not
> > formatted.
>
> I understand that:
>
> * we do want to
@@ -2088,6 +2088,19 @@ struct FormatStyle {
/// \version 3.7
bool BreakBeforeTernaryOperators;
+ /// Break between concatenated string literals in C, C++, and Objective-C.
owenca wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/73432
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/73432
___
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/73432
>From def7bbb22cdd9269aa927d8dcf4247c88877503b Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 25 Nov 2023 23:55:11 -0800
Subject: [PATCH 1/2] [clang-format] Add BreakConcatenatedStrings option
Closes #70451.
Author: Owen Pan
Date: 2023-11-26T22:54:44-08:00
New Revision: 659e4017b7371efa8ce97da2d87270c60a93d03d
URL:
https://github.com/llvm/llvm-project/commit/659e4017b7371efa8ce97da2d87270c60a93d03d
DIFF:
https://github.com/llvm/llvm-project/commit/659e4017b7371efa8ce97da2d87270c60a93d03d.diff
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/73220
___
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/73432
Closes #70451.
>From def7bbb22cdd9269aa927d8dcf4247c88877503b Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 25 Nov 2023 23:55:11 -0800
Subject: [PATCH] [clang-format] Add BreakConcatenatedStrings option
@@ -1171,6 +1171,13 @@ void UnwrappedLineParser::parsePPDefine() {
assert((int)Line->PPLevel >= 0);
Line->InMacroBody = true;
+ if (FormatTok->is(tok::identifier) &&
+ Tokens->peekNextToken()->is(tok::colon)) {
+nextToken();
+nextToken();
+
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/73220
>From 0a8459053be654313efff8002ff3e171d8cd9d18 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 23 Nov 2023 00:41:41 -0800
Subject: [PATCH 1/2] [clang-format] Fix a bug in formating `#define A x:`
Fixed
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/73220
Fixed #70789.
>From 0a8459053be654313efff8002ff3e171d8cd9d18 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 23 Nov 2023 00:41:41 -0800
Subject: [PATCH] [clang-format] Fix a bug in formating `#define A x:`
owenca wrote:
After giving more thoughts to this, I think what we really want is
`SkipMacroDefinitionBody`, which would format the code below:
```
# define A a. b //comment
# define A( x , y ) ( ( x ) + ( y ) )
```
To the following:
```
#define A a. b // comment
#define A(x,
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IgnorePPDefinitions = true;
+
+
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IgnorePPDefinitions = true;
+
+
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IgnorePPDefinitions = true;
+
+
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IgnorePPDefinitions = true;
+
+
https://github.com/owenca requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/70338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2443,6 +2443,10 @@ struct FormatStyle {
/// \version 13
std::vector IfMacros;
+ /// Ignore formatting in preprocessor definitions.
owenca wrote:
```suggestion
/// Do not format macro definitions.
```
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
owenca wrote:
```suggestion
@@ -1355,6 +1362,10 @@ unsigned UnwrappedLineFormatter::format(
bool FixIndentation = (FixBadIndentation || ContinueFormatting) &&
Indent != TheLine.First->OriginalColumn;
bool ShouldFormat = TheLine.Affected || FixIndentation;
+
+if
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2443,6 +2443,10 @@ struct FormatStyle {
/// \version 13
std::vector IfMacros;
+ /// Ignore formatting in preprocessor definitions.
+ /// \version 18
+ bool IgnorePPDefinitions;
owenca wrote:
Please rename it to `SkipMacroDefinition` or similar.
https://github.com/owenca commented:
Please update ReleaseNotes.rst.
https://github.com/llvm/llvm-project/pull/70338
___
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/72733
___
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/72768
___
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/72791
___
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/72166
___
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/72791
Fixed #72785.
>From 0aadd3c1e458f1137c4d45bc14dfae7db9b0446f Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 19 Nov 2023 03:41:58 -0800
Subject: [PATCH] [clang-format] Fix a bug in aligning comments above
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70338
___
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/70338
___
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/72768
Fixed #72751.
>From 188eeabc89cfc4851ad1943d5ef6bf11bc6cb629 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 18 Nov 2023 16:37:45 -0800
Subject: [PATCH] [clang-format] Fix a bug in isStartOfName() on macro
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/72733
Also fixed some existing test cases.
Fixed #57305.
Fixed #58251.
>From 519c21da642026b917c2e51c95cc4347f85163ca Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 17 Nov 2023 17:51:33 -0800
Subject: [PATCH]
Author: Owen Pan
Date: 2023-11-17T18:18:49-08:00
New Revision: f6033699646b7650123a273c043a93e5eeaac6d8
URL:
https://github.com/llvm/llvm-project/commit/f6033699646b7650123a273c043a93e5eeaac6d8
DIFF:
https://github.com/llvm/llvm-project/commit/f6033699646b7650123a273c043a93e5eeaac6d8.diff
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72166
___
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/72520
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> > Thanks for trying it on 17.x. We can't backport it then.
>
> Any idea if there is another workaround or fix that we could do to target
> 17.x? 18 is still pretty far off and clang-format for 17 will soon be
> included in a lot of downstream tools. Happy to help out fixing it
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/72520
>From efdf321e9447e8b3f1c27ccdf6da842107deb6dd Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 16 Nov 2023 06:36:41 -0800
Subject: [PATCH 1/4] [clang-format] Fix crashes in AlignArrayOfStructures
Fixed
@@ -20709,6 +20709,18 @@ TEST_F(FormatTest, CatchExceptionReferenceBinding) {
TEST_F(FormatTest, CatchAlignArrayOfStructuresRightAlignment) {
auto Style = getLLVMStyle();
Style.AlignArrayOfStructures = FormatStyle::AIAS_Right;
+
+ verifyNoCrash("f({\n"
+
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72520
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> @owenca I picked da1b1fba5cfd41521a840202d8cf4c3796c5e10b on top of the 17.x
> branch and my test case was not fixed, it still crashes in the same way as
> described in #72628
Thanks for trying it on 17.x. We can't backport it then.
owenca wrote:
We probably should backport it to 17.0.6. What do you all think? @tru
https://github.com/llvm/llvm-project/pull/72520
___
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/72520
>From efdf321e9447e8b3f1c27ccdf6da842107deb6dd Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 16 Nov 2023 06:36:41 -0800
Subject: [PATCH 1/3] [clang-format] Fix crashes in AlignArrayOfStructures
Fixed
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72520
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1316,6 +1316,8 @@ void
WhitespaceManager::alignArrayInitializersRightJustified(
auto Offset = std::distance(Cells.begin(), CellIter);
for (const auto *Next = CellIter->NextColumnElement; Next;
Next = Next->NextColumnElement) {
+ if
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/72520
>From efdf321e9447e8b3f1c27ccdf6da842107deb6dd Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 16 Nov 2023 06:36:41 -0800
Subject: [PATCH 1/2] [clang-format] Fix crashes in AlignArrayOfStructures
Fixed
601 - 700 of 1139 matches
Mail list logo