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 #55493.
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 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
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
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
LOG:
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] [cla
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
de
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/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
PPD
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 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/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/72733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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
@@ -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.
ht
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
@@ -1355,6 +1362,10 @@ unsigned UnwrappedLineFormatter::format(
bool FixIndentation = (FixBadIndentation || ContinueFormatting) &&
Indent != TheLine.First->OriginalColumn;
bool ShouldFormat = TheLine.Affected || FixIndentation;
+
+if (Style
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
owenca wrote:
```suggesti
@@ -2443,6 +2443,10 @@ struct FormatStyle {
/// \version 13
std::vector IfMacros;
+ /// Ignore formatting in preprocessor definitions.
owenca wrote:
```suggestion
/// Do not format macro definitions.
```
https://github.com/llvm/llvm-project/pull/70338
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
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IgnorePPDefinitions = true;
+
+ v
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IgnorePPDefinitions = true;
+
+ v
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IgnorePPDefinitions = true;
+
+ v
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IgnorePPDefinitions = true;
+
+ v
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
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, y)
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:`
Fi
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/70519
It's one type of TT_TrailingReturnArrow.
>From 64d622264f2e3cd3345f741965f450daa00bac5e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 27 Oct 2023 15:33:40 -0700
Subject: [PATCH] [clang-format][NFC] Delete TT
https://github.com/owenca requested changes to this pull request.
Please refer to the
[policy](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options)
for adding new options.
https://github.com/llvm/llvm-project/pull/70338
_
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
owenca wrote:
> #67911 is a pull request, not an issue, i'm not sure what you're referring to
I think it was a typo. It should be #67991.
https://github.com/llvm/llvm-project/pull/70338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/70519
___
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/70583
___
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/70602
___
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/70768
A for/while loop with only a semicolon as its body should be treated as an
empty loop.
Fixes #61708.
>From 7e6030532f99b4128807631e993609ce40171043 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 30 Oct 2023
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool
HasParens) {
FormatTok->setFinalizedType(TT_ConditionLParen);
parseParens();
}
- // Event control.
- if (Style.isVerilog())
+
+ if (Style.isVerilog()) {
+// Event control.
parseVe
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70768
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -185,6 +191,8 @@ def main():
diff_string = "".join(diff)
if len(diff_string) > 0:
sys.stdout.write(diff_string)
+if args.non_zero_exit_code:
+sys.exit(1)
owenca wrote:
```suggestion
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool
HasParens) {
FormatTok->setFinalizedType(TT_ConditionLParen);
parseParens();
}
- // Event control.
- if (Style.isVerilog())
+
+ if (Style.isVerilog()) {
+// Event control.
parseVe
@@ -185,6 +191,8 @@ def main():
diff_string = "".join(diff)
if len(diff_string) > 0:
sys.stdout.write(diff_string)
+if args.non_zero_exit_code:
+sys.exit(1)
owenca wrote:
I was aware o
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/70768
>From 7e6030532f99b4128807631e993609ce40171043 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 30 Oct 2023 22:50:27 -0700
Subject: [PATCH 1/2] [clang-format] Treat empty for/while loops as short loops
A for/wh
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool
HasParens) {
FormatTok->setFinalizedType(TT_ConditionLParen);
parseParens();
}
- // Event control.
- if (Style.isVerilog())
+
+ if (Style.isVerilog()) {
+// Event control.
parseVe
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70768
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool
HasParens) {
FormatTok->setFinalizedType(TT_ConditionLParen);
parseParens();
}
- // Event control.
- if (Style.isVerilog())
+
+ if (Style.isVerilog()) {
+// Event control.
parseVe
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/70768
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
@rymiel can we merge this?
https://github.com/llvm/llvm-project/pull/69473
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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://lists.llvm.org/cgi-bin/m
@@ -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 git-clang
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 200
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
@@ -164,6 +167,12 @@ class AnnotatingParser {
TT_OverloadedOperatorLParen))) {
return false;
}
+ FormatToken *ClosingParen = nullptr;
+ if (Previous.Previous->is(tok::kw_operator) &&
+ isFunctionDeclarationName(Style.isCpp(), *Pre
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
@@ -11727,6 +11727,13 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
" void func(type &a) { a & member; }\n"
" anotherType &member;\n"
"}");
+
+ Style.ReferenceAlignment = FormatStyle::RAS_Left;
+ verifyFormat("class Foo {\
@@ -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 {\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 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
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 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 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 `IndentExternB
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/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 23:2
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 #70789.
@@ -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();
+addUnwrappedLin
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
Clo
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
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
LOG:
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.
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
@@ -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
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
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
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
isProtoB
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
cfe-commits@lists
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] [-
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:
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://lists.llvm.org/c
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:
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 sh
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 replacement:
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
@@ -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 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
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
@@ -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 (St
@@ -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) && !Line->InPPDirective)
@@ -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"
+ " { \\\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"
+ " { \\\n
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
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
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
LOG:
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
L
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`
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 00:00:00
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 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
101 - 200 of 2315 matches
Mail list logo