https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/107506
Fixes #107401.
>From bd7da6ec9afabd829010db4c33d088590ab68b5a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 5 Sep 2024 19:44:46 -0700
Subject: [PATCH] [clang-format] Fix a regression on BAS_AlwaysBreak
Fix
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/107352
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick 616a8ce6203d8c7569266bfaf163e74df1f440ad
https://github.com/llvm/llvm-project/pull/107352
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
Done in #107531.
https://github.com/llvm/llvm-project/pull/107352
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
@jediry, can you open a github issue for this?
We probably should continue the discussion on your
[RFC](https://discourse.llvm.org/t/rfc-clang-format-option-to-include-another-configuration-file/74891)
before getting into the details of the implementation. At the very least, I
n
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) {
Style);
}
+TEST_F(FormatTest, ShortNamespacesOption) {
+ FormatStyle Style = getLLVMStyle();
owenca wrote:
```suggestion
auto Style = getLLVMStyle();
```
https://github.c
https://github.com/owenca commented:
The following are missing:
- Run `dump_format_style.py`.
- Add a `ConfigParseTest` for the new option.
How does the new option interact with `CompactNamespaces`? For example:
- `AllowShortNamespacesOnASingleLine: true` and `CompactNamespaces: false`
```
names
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) {
Style);
}
+TEST_F(FormatTest, ShortNamespacesOption) {
+ FormatStyle Style = getLLVMStyle();
+ Style.AllowShortNamespacesOnASingleLine = true;
+ Style.FixNamespaceComments = false;
+
+ //
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) {
Style);
}
+TEST_F(FormatTest, ShortNamespacesOption) {
+ FormatStyle Style = getLLVMStyle();
+ Style.AllowShortNamespacesOnASingleLine = true;
+ Style.FixNamespaceComments = false;
+
+ //
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/105597
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) {
Style);
}
+TEST_F(FormatTest, ShortNamespacesOption) {
+ FormatStyle Style = getLLVMStyle();
+ Style.AllowShortNamespacesOnASingleLine = true;
+ Style.FixNamespaceComments = false;
+
+ //
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/107675
Fixes #107568.
>From 6deac871ceae8ba3918570a4bdbd8476e014a3a1 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 7 Sep 2024 01:39:34 -0700
Subject: [PATCH] [clang-format] Fix a bug in annotating CastRParen
Fixe
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/107506
>From bd7da6ec9afabd829010db4c33d088590ab68b5a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 5 Sep 2024 19:44:46 -0700
Subject: [PATCH 1/2] [clang-format] Fix a regression on BAS_AlwaysBreak
Fixes #107401.
@@ -861,7 +861,7 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState
&State, bool DryRun,
// or
// cal(
// new SomethingElseee());
- !IsSimpleFunction(Current)) {
+ Current.isNot(
owenca wrote:
> i've also found 3 more cases that point back to same patch in #107574, in
> case you want to address all of them with this change
I'd rather make incremental changes. Maybe you or @gedare can give them a try.
https://github.com/llvm/llvm-project/pull/107506
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/107675
___
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/107506
>From bd7da6ec9afabd829010db4c33d088590ab68b5a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 5 Sep 2024 19:44:46 -0700
Subject: [PATCH 1/3] [clang-format] Fix a regression on BAS_AlwaysBreak
Fixes #107401.
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/107506
___
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/107506
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca requested changes to this pull request.
Running `FormatTests` failed:
```
[ RUN ] FormatTest.WrapNamespaceBodyWithEmptyLinesNever
Assertion failed: (TheLine->MatchingClosingBlockLineIndex > 0), function
tryFitMultipleLinesInOne, file UnwrappedLineFormatter.cpp, lin
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/107962
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -86,9 +86,7 @@ void ObjCPropertyAttributeOrderFixer::sortPropertyAttributes(
Value = Tok->TokenText;
}
-auto It = SortOrderMap.find(Attribute);
-if (It == SortOrderMap.end())
- It = SortOrderMap.insert({Attribute, SortOrderMap.size()}).first;
+aut
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/102629
With the --force (or -f) option, git-clang-format wipes out input files
excluded by a .clang-format-ignore file if they have unstaged changes.
This patch adds a hidden clang-format option --list-ignored that lis
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/102629
>From 9b71b289feb75cdc6d67a6ac696ff0ba7969549d Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 9 Aug 2024 08:15:43 -0700
Subject: [PATCH 1/2] [clang-format] Fix a serious bug in `git clang-format -f`
With the
owenca wrote:
> Thanks for the review feedback @owenca @HazardyKnusperkeks Please merge this
> PR for me if you feel it is ready as I don't have merge permissions
I wonder if anyone can come up with a better name than `OnePerLine`. See
https://github.com/llvm/llvm-project/pull/101882#issuecomm
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/102629
>From 9b71b289feb75cdc6d67a6ac696ff0ba7969549d Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 9 Aug 2024 08:15:43 -0700
Subject: [PATCH 1/3] [clang-format] Fix a serious bug in `git clang-format -f`
With the
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/102629
>From 9b71b289feb75cdc6d67a6ac696ff0ba7969549d Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 9 Aug 2024 08:15:43 -0700
Subject: [PATCH 1/4] [clang-format] Fix a serious bug in `git clang-format -f`
With the
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/95013
___
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/102629
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick 986bc3d0719af653fecb77e8cfc59f39bec148fd
https://github.com/llvm/llvm-project/pull/102629
___
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/102629
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
You need to use the clang-format built from this patch, which adds the new
clang-format `-list-ignored` option.
https://github.com/llvm/llvm-project/pull/102629
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/102921
Fixes #101487.
>From 5fd35e3d2b9775867a259457879fc7030c901724 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 12 Aug 2024 08:24:12 -0700
Subject: [PATCH] [clang-format] Correctly handle C# attribute on auto p
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/102921
___
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/102998
Fixes #102937.
>From bd4a32c90f6148d27b010a5a1497c0f447144d9a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 12 Aug 2024 20:58:04 -0700
Subject: [PATCH] [clang-format] Fix annotation of braces enclosing
str
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/102998
___
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/102998
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick ee2359968fa307ef45254c816e14df33374168cd
https://github.com/llvm/llvm-project/pull/102998
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -497,6 +497,16 @@ template <> struct
MappingTraits {
}
};
+template <> struct ScalarEnumerationTraits {
+ static void enumeration(IO &IO, FormatStyle::ReflowCommentsStyle &Value) {
+IO.enumCase(Value, "Never", FormatStyle::RCS_Never);
+IO.enumCase(Value, "Indent
@@ -3750,24 +3750,43 @@ struct FormatStyle {
ReferenceAlignmentStyle ReferenceAlignment;
// clang-format off
- /// If ``true``, clang-format will attempt to re-flow comments. That is it
- /// will touch a comment and *reflow* long comments into new lines, trying to
- //
@@ -4588,11 +4588,11 @@ bool UnwrappedLineParser::isOnNewLine(const FormatToken
&FormatTok) {
// Checks if \p FormatTok is a line comment that continues the line comment
// section on \p Line.
-static bool
-continuesLineCommentSection(const FormatToken &FormatTok,
-
@@ -4588,11 +4588,11 @@ bool UnwrappedLineParser::isOnNewLine(const FormatToken
&FormatTok) {
// Checks if \p FormatTok is a line comment that continues the line comment
// section on \p Line.
-static bool
-continuesLineCommentSection(const FormatToken &FormatTok,
-
@@ -855,7 +859,8 @@ bool BreakableBlockComment::mayReflow(
StringRef IndentContent = Content[LineIndex];
if (Lines[LineIndex].ltrim(Blanks).starts_with("*"))
IndentContent = Lines[LineIndex].ltrim(Blanks).substr(1);
- return LineIndex > 0 && !CommentPragmasRegex.match(
@@ -420,8 +420,10 @@ BreakableComment::getSplit(unsigned LineIndex, unsigned
TailOffset,
unsigned ColumnLimit, unsigned ContentStartColumn,
const llvm::Regex &CommentPragmasRegex) const {
// Don't break lines matching the
@@ -493,9 +493,36 @@ TEST_F(FormatTestComments, AlignsBlockComments) {
TEST_F(FormatTestComments, CommentReflowingCanBeTurnedOff) {
FormatStyle Style = getLLVMStyleWithColumns(20);
- Style.ReflowComments = false;
- verifyFormat("// a aa aa", Style);
@@ -1160,7 +1165,8 @@ bool BreakableLineCommentSection::mayReflow(
// // text that protrudes
// //into text with different indent
// We do reflow in that case in block comments.
- return LineIndex > 0 && !CommentPragmasRegex.match(IndentContent) &&
+ return LineInde
@@ -608,8 +610,10 @@ BreakableToken::Split BreakableBlockComment::getSplit(
unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit,
unsigned ContentStartColumn, const llvm::Regex &CommentPragmasRegex) const
{
// Don't break lines matching the comment pragmas r
@@ -4778,8 +4778,8 @@ void UnwrappedLineParser::distributeComments(
if (HasTrailAlignedWithNextToken && i == StartOfTrailAlignedWithNextToken)
{
FormatTok->ContinuesLineCommentSection = false;
} else {
- FormatTok->ContinuesLineCommentSection =
- co
@@ -3750,24 +3750,43 @@ struct FormatStyle {
ReferenceAlignmentStyle ReferenceAlignment;
// clang-format off
- /// If ``true``, clang-format will attempt to re-flow comments. That is it
- /// will touch a comment and *reflow* long comments into new lines, trying to
- //
@@ -493,9 +493,36 @@ TEST_F(FormatTestComments, AlignsBlockComments) {
TEST_F(FormatTestComments, CommentReflowingCanBeTurnedOff) {
FormatStyle Style = getLLVMStyleWithColumns(20);
- Style.ReflowComments = false;
- verifyFormat("// a aa aa", Style);
@@ -4704,8 +4704,8 @@ void UnwrappedLineParser::flushComments(bool
NewlineBeforeNext) {
//
// FIXME: Consider putting separate line comment sections as children to
the
// unwrapped line instead.
-Tok->ContinuesLineCommentSection =
-continuesLineComment
@@ -493,9 +493,36 @@ TEST_F(FormatTestComments, AlignsBlockComments) {
TEST_F(FormatTestComments, CommentReflowingCanBeTurnedOff) {
FormatStyle Style = getLLVMStyleWithColumns(20);
- Style.ReflowComments = false;
- verifyFormat("// a aa aa", Style);
@@ -5272,22 +5272,46 @@ the configuration (without a prefix: ``Auto``).
.. _ReflowComments:
-**ReflowComments** (``Boolean``) :versionbadge:`clang-format 3.8` :ref:`¶
`
- If ``true``, clang-format will attempt to re-flow comments. That is it
- will touch a comment and *ref
owenca wrote:
> Can we have a rule that a PR that reaches 6 months or 1 year without activity
> we close with a comment of "
Yep. IMO six months of no response _from the author_ is sufficient to close the
PR. However, if we can't find a reviewer for the PR (e.g. #78904), we should
leave it op
@@ -4493,13 +4493,11 @@ struct FormatStyle {
bool SpaceBeforeRangeBasedForLoopColon;
/// If ``true``, spaces will be inserted into ``{}``.
- /// \code
- ///true:false:
- ///void f() { } vs. void f() {}
- ///
owenca wrote:
> Whilst I can understand BinPackParameters being deprecated, as its one of the
> original options I do worry a little about just how much impact such a
> deprecation might have... it needs to be completely seemless because there is
> ALOT of documentation references to its use o
owenca wrote:
> > When you say rename, do you mean deprecate `BinPackParameters` like in
> > these changes
> > [6739bb5](https://github.com/llvm/llvm-project/commit/6739bb5006bc28e2bdbdb2326eb2c957546634aa)
> > but using `BreakParameters` and `Never`/`OnePerLine`/`Always` for the
> > names?
>
@@ -5272,22 +5272,46 @@ the configuration (without a prefix: ``Auto``).
.. _ReflowComments:
-**ReflowComments** (``Boolean``) :versionbadge:`clang-format 3.8` :ref:`¶
`
- If ``true``, clang-format will attempt to re-flow comments. That is it
- will touch a comment and *ref
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/96804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca dismissed
https://github.com/llvm/llvm-project/pull/87450
___
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/87450
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick 8de230093f58
https://github.com/llvm/llvm-project/pull/82097
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Owen Pan
Date: 2024-04-05T22:17:50-07:00
New Revision: 770202343ebce1f2bc0745c78e298e251f204bee
URL:
https://github.com/llvm/llvm-project/commit/770202343ebce1f2bc0745c78e298e251f204bee
DIFF:
https://github.com/llvm/llvm-project/commit/770202343ebce1f2bc0745c78e298e251f204bee.diff
LOG:
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/87868
None
>From 5c614fec2b54c146841a9ef3089dee1a63f72543 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 5 Apr 2024 22:45:47 -0700
Subject: [PATCH] [clang-format][NFC] Add getNextNonComment() to
FormatTokenSource
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/87868
>From 5c614fec2b54c146841a9ef3089dee1a63f72543 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 5 Apr 2024 22:45:47 -0700
Subject: [PATCH 1/2] [clang-format][NFC] Add getNextNonComment() to
FormatTokenSource
-
Author: Owen Pan
Date: 2024-04-06T01:51:45-07:00
New Revision: 684f27d37a6f1faf546a71bcb784b48c7fc8b7e0
URL:
https://github.com/llvm/llvm-project/commit/684f27d37a6f1faf546a71bcb784b48c7fc8b7e0
DIFF:
https://github.com/llvm/llvm-project/commit/684f27d37a6f1faf546a71bcb784b48c7fc8b7e0.diff
LOG:
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/87868
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -290,6 +290,16 @@ TEST_F(FormatTestTableGen, MultiClass) {
"}\n");
}
+TEST_F(FormatTestTableGen, MultiClassesWithPasteOperator) {
+ // This is a sensitive example for the handling of the paste operators in
+ // brace type calculation.
+ verifyFormat("multi
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/87953
Also fix unit tests and reformat polly.
Fixes #86550.
>From 6d0c7e5602a227b1b7310be46553aa689e6a93e7 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 7 Apr 2024 17:27:21 -0700
Subject: [PATCH] [clang-format] C
@@ -538,16 +538,6 @@ void UnwrappedLineParser::calculateBraceTypes(bool
ExpectClassBody) {
if (Style.Language == FormatStyle::LK_Proto) {
ProbablyBracedList = NextTok->isOneOf(tok::comma, tok::r_square);
} else {
- // Skip NextTok over prepro
owenca wrote:
The polly formatting failure should be ignored as CI is using clang-format
18.1.1 instead of the version built from this patch.
https://github.com/llvm/llvm-project/pull/87953
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/87953
___
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/87983
___
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/88085
Fixes #87907.
>From 0daef6caaac5d3779cda0d4cbbf9cd2514662b92 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 8 Apr 2024 20:29:26 -0700
Subject: [PATCH] [clang-format] instanceof is a keyword only in
Java/Java
Author: Owen Pan
Date: 2024-04-08T21:20:18-07:00
New Revision: 5c056b32350e834924356b1af78504d261d24e42
URL:
https://github.com/llvm/llvm-project/commit/5c056b32350e834924356b1af78504d261d24e42
DIFF:
https://github.com/llvm/llvm-project/commit/5c056b32350e834924356b1af78504d261d24e42.diff
LOG:
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/87953
___
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/88085
___
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/88238
Also fix unit tests.
Fixes #87484.
>From 4122a4f0e189afa7aff1010f0061b4f4d2b2a627 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 10 Apr 2024 00:03:21 -0700
Subject: [PATCH] [clang-format] Don't merge a short
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/88238
>From 4122a4f0e189afa7aff1010f0061b4f4d2b2a627 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 10 Apr 2024 00:03:21 -0700
Subject: [PATCH 1/2] [clang-format] Don't merge a short block for SBS_Never
Also fix un
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/88238
___
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/88352
See commit 51f1681424f1.
>From 3ecf27d15646345f43703f5a361bd9766307ebf4 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 10 Apr 2024 21:22:05 -0700
Subject: [PATCH] [clangd] Fix test case due to clang-format bu
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/88352
>From a070f07c16ddacc1aaf7591a1f7c129bf6abc90a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 10 Apr 2024 21:22:05 -0700
Subject: [PATCH] [clangd] Fix test case due to clang-format bug fix
See commit 51f16814
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/88352
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
@HighCommander4 Thanks!
https://github.com/llvm/llvm-project/pull/88352
___
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/88414
Commit d06b92391513 caused a regression that breaks after a block comment
adjacent to a function paramter that follows.
Fixes #86573.
>From 2ec43f6dc1fafed9d7fc324eeacfa07133af3abd Mon Sep 17 00:00:00 2001
From:
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/88414
___
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/88414
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> I wish we'd made this removal an option rather than just removing it, what we
> are seeing is reasonably formatted json or xml being streamed out is now
> poorly written
>
> ```c++
> osjson << "{\n"
><<" \"name\": \"value\",\n"
><<" \"key\": \"abc\", \n"
>
owenca wrote:
Please see
https://github.com/llvm/llvm-project/issues/88483#issuecomment-2053928993 and
Conversation in #69859, which was the first attempt at adding an option for
breaking consecutive stream insertion operations. Instead of handling
everything specified in
https://github.com/
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/94425
___
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/94561
Fixes #94555.
>From f5a4cd0df1df390166adb8400e21894a0f2db18f Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 5 Jun 2024 19:18:19 -0700
Subject: [PATCH] [clang-format] Fix a bug in `AlignAfterOpenBracket:
Dont
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/94548
___
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/94548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
It means "No Functional Change". See
[here](https://llvm.org/docs/Lexicon.html#n).
https://github.com/llvm/llvm-project/pull/94548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/94561
___
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/94548
___
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/92617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca commented:
What happens if the comment is unindented, with and without an empty line below
it?
https://github.com/llvm/llvm-project/pull/94776
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -4828,7 +4833,10 @@ void UnwrappedLineParser::readToken(int LevelDifference)
{
PPBranchLevel > 0) {
Line->Level += PPBranchLevel;
}
- flushComments(isOnNewLine(*FormatTok));
+
+ if (!UnbracedBodyDepth)
owenca wrote:
Ditto.
@@ -796,6 +796,44 @@ TEST_F(FormatTestComments,
ParsesCommentsAdjacentToPPDirectives) {
format("namespace {}\n /* Test */#define A"));
}
+TEST_F(FormatTestComments, DeIdentsCommentBeforeIfdefAfterBracelessIf) {
+ verifyFormat("void f() {\n"
+
1001 - 1100 of 2446 matches
Mail list logo