https://github.com/owenca commented:
See https://github.com/llvm/llvm-project/issues/66857#issuecomment-1793022188.
Can you make this a suboption, e.g. `AlignFunctionPointers`? We can add another
(e.g. `AlignConstructorsDestructors`) for ctors and dtors in the future.
https://github.com/llvm/l
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/71755
>From 17921d5a1d74017128691428815ede53ac1a4d67 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 8 Nov 2023 17:55:56 -0800
Subject: [PATCH 1/2] [clang-format] Handle variable declarations in
BreakAfterAttributes
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/71755
___
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-09T23:34:06-08:00
New Revision: a0710e162dac8eb845588779deb39f2b35e5cb88
URL:
https://github.com/llvm/llvm-project/commit/a0710e162dac8eb845588779deb39f2b35e5cb88
DIFF:
https://github.com/llvm/llvm-project/commit/a0710e162dac8eb845588779deb39f2b35e5cb88.diff
LOG:
Author: Owen Pan
Date: 2023-11-10T01:23:05-08:00
New Revision: cc75e520162ef651977d3f6d11b0d0b92dd2be07
URL:
https://github.com/llvm/llvm-project/commit/cc75e520162ef651977d3f6d11b0d0b92dd2be07
DIFF:
https://github.com/llvm/llvm-project/commit/cc75e520162ef651977d3f6d11b0d0b92dd2be07.diff
LOG:
Author: Owen Pan
Date: 2023-11-10T01:53:43-08:00
New Revision: f7bbb58690910a8320b0927525dfba19df69a910
URL:
https://github.com/llvm/llvm-project/commit/f7bbb58690910a8320b0927525dfba19df69a910
DIFF:
https://github.com/llvm/llvm-project/commit/f7bbb58690910a8320b0927525dfba19df69a910.diff
LOG:
Author: Owen Pan
Date: 2023-11-10T02:03:35-08:00
New Revision: 86ef9d36519f72c06741335ce0a445ab73eb4cfb
URL:
https://github.com/llvm/llvm-project/commit/86ef9d36519f72c06741335ce0a445ab73eb4cfb
DIFF:
https://github.com/llvm/llvm-project/commit/86ef9d36519f72c06741335ce0a445ab73eb4cfb.diff
LOG:
owenca wrote:
@Meinersbur thanks for the info!
https://github.com/llvm/llvm-project/pull/71755
___
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/71935
Also fixed a bug in `isStartOfName()` and cleaned up some old test cases.
Fixed #71563.
This is a rework of #71755.
>From 17921d5a1d74017128691428815ede53ac1a4d67 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: W
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/71935
___
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/71995
This patch doesn't work for do-while loops.
Fixed #64474.
>From b67ea36d180e700cc6b0661e8f2390eda515c566 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 10 Nov 2023 00:21:58 -0800
Subject: [PATCH] [clang-form
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/72010
None
>From f3f303d80a40b9ce8a13721cfa108b4094b8b2c3 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 10 Nov 2023 17:34:06 -0800
Subject: [PATCH] [clang-format][NFC] Simplify parseBracedList()
---
clang/lib/Fo
@@ -1432,34 +1432,82 @@ struct FormatStyle {
/// const int i;
/// [[gnu::const]] [[maybe_unused]]
/// int j;
+///
/// [[nodiscard]]
/// inline int f();
/// [[gnu::const]] [[nodiscard]]
/// int g();
+///
+/// [[likely]]
@@ -2049,8 +2049,10 @@ the configuration (without a prefix: ``Auto``).
.. _BreakAfterAttributes:
**BreakAfterAttributes** (``AttributeBreakingStyle``)
:versionbadge:`clang-format 16` :ref:`¶ `
- Break after a group of C++11 attributes before a variable/function
- (including
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/71995
>From b67ea36d180e700cc6b0661e8f2390eda515c566 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 10 Nov 2023 00:21:58 -0800
Subject: [PATCH 1/2] [clang-format] Handle control statements in
BreakAfterAttributes
@@ -802,7 +802,10 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState
&State, bool DryRun,
Previous.isNot(TT_ObjCMethodExpr) && Previous.isNot(TT_RequiresClause) &&
!(Current.MacroParent && Previous.MacroParent) &&
(Current.isNot(TT_LineComment) ||
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/72010
>From f3f303d80a40b9ce8a13721cfa108b4094b8b2c3 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 10 Nov 2023 17:34:06 -0800
Subject: [PATCH 1/2] [clang-format][NFC] Simplify parseBracedList()
---
clang/lib/Form
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/71995
___
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/72010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Owen Pan
Date: 2023-10-25T17:06:53-07:00
New Revision: 265ed6819409a9d76f112a601d48b971904921c8
URL:
https://github.com/llvm/llvm-project/commit/265ed6819409a9d76f112a601d48b971904921c8
DIFF:
https://github.com/llvm/llvm-project/commit/265ed6819409a9d76f112a601d48b971904921c8.diff
LOG:
Author: Owen Pan
Date: 2023-10-26T13:37:23-07:00
New Revision: e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2
URL:
https://github.com/llvm/llvm-project/commit/e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2
DIFF:
https://github.com/llvm/llvm-project/commit/e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2.diff
LOG:
owenca wrote:
This would change the default for every other predefined style, which might be
ok if there's no mention of breaking after C++11 attributes in those styles.
https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-
Author: Owen Pan
Date: 2023-10-26T21:43:27-07:00
New Revision: 88934a82dced0116227e4ad9af8896d8fa0943b8
URL:
https://github.com/llvm/llvm-project/commit/88934a82dced0116227e4ad9af8896d8fa0943b8
DIFF:
https://github.com/llvm/llvm-project/commit/88934a82dced0116227e4ad9af8896d8fa0943b8.diff
LOG:
owenca wrote:
IMO, the new behavior is consistent with the
[documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#columnlimit)
for `ColumnLimt: 0`.
https://github.com/llvm/llvm-project/pull/69871
___
cfe-commits mailing list
cfe-com
Author: Owen Pan
Date: 2023-10-27T02:22:36-07:00
New Revision: 6c3bc910588f962e49470098ccc3b13c29cae493
URL:
https://github.com/llvm/llvm-project/commit/6c3bc910588f962e49470098ccc3b13c29cae493
DIFF:
https://github.com/llvm/llvm-project/commit/6c3bc910588f962e49470098ccc3b13c29cae493.diff
LOG:
owenca wrote:
> [Google](https://google.github.io/styleguide/cppguide.html) is the only one
> mentioning attributes:
>
> > Attributes, and macros that expand to attributes, appear at the very
> > beginning of the function declaration or definition, before the return type:
> > ```c++
> > ABSL_
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70360
___
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/70360
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -794,6 +794,7 @@ clang-format
- Add ``AllowBreakBeforeNoexceptSpecifier`` option.
- Add ``AllowShortCompoundRequirementOnASingleLine`` option.
+- Change ``BreakAfterAttributes`` from ``Never`` to ``Leave`` in LLVM style
owenca wrote:
Full stop
@@ -26179,7 +26179,7 @@ TEST_F(FormatTest, RemoveSemicolon) {
TEST_F(FormatTest, BreakAfterAttributes) {
FormatStyle Style = getLLVMStyle();
- EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Never);
+ EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Leave);
--
Author: Owen Pan
Date: 2023-10-27T03:42:16-07:00
New Revision: 9299ace0a20d3ea4d921c033a49364ea6f24263e
URL:
https://github.com/llvm/llvm-project/commit/9299ace0a20d3ea4d921c033a49364ea6f24263e
DIFF:
https://github.com/llvm/llvm-project/commit/9299ace0a20d3ea4d921c033a49364ea6f24263e.diff
LOG:
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/70360
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> @gedare can you fix the merge conflict on this one?
We don't want to merge this yet. See
[here](https://github.com/llvm/llvm-project/issues/68079#issuecomment-1776826021).
https://github.com/llvm/llvm-project/pull/69340
___
cfe-commit
https://github.com/owenca requested changes to this pull request.
Please see
[here](https://github.com/llvm/llvm-project/issues/68079#issuecomment-1776826021).
https://github.com/llvm/llvm-project/pull/69340
___
cfe-commits mailing list
cfe-commits@li
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
@@ -5151,6 +5151,14 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine
&Line,
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;
+ EXPE
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
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
@@ -76,40 +76,49 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
+ /*AlignF
@@ -76,40 +76,49 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
+ /*AlignF
@@ -76,40 +76,49 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
+ /*AlignF
https://github.com/owenca edited 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
@@ -76,40 +76,49 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
+ /*AlignF
@@ -225,6 +225,22 @@ struct FormatStyle {
/// bbb = 2;
/// \endcode
bool AlignCompound;
+/// Only for ``AlignConsecutiveDeclarations``. Whether function pointers
+/// are aligned.
owenca wrote:
```suggestion
/// Only for ``AlignConsec
@@ -978,7 +978,14 @@ void WhitespaceManager::alignConsecutiveDeclarations() {
AlignTokens(
Style,
- [](Change const &C) {
+ [&](Change const &C) {
+if (Style.AlignConsecutiveDeclarations.AlignFunctionPointers) {
+ for (FormatToken *Prev = C.T
@@ -76,40 +76,49 @@ template <> struct
MappingTraits {
FormatStyle::AlignConsecutiveStyle(
{/*Enabled=*/false, /*AcrossEmptyLines=*/false,
/*AcrossComments=*/false, /*AlignCompound=*/false,
+ /*AlignF
owenca wrote:
@darkfeline I'm ok with adding the Version comment in
clang/tools/clang-format/clang-format.el, but you may have to explicitly
request others to review the rest of the patch.
https://github.com/llvm/llvm-project/pull/76110
___
cfe-commi
@@ -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;
+ EXPE
@@ -1444,16 +1444,26 @@ 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)) // d
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/76795
___
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/76804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> > can you also add a test to clang/unittests/Format/TokenAnnotatorTest.cpp
> > that ensures trailing attribute-like macros receive `StartOfName`
> > annotation to make sure we don't regress the signal in the future?
>
> ok, that opened a whole can of worms.
>
> ```
> Tokens =
@@ -2209,7 +2209,8 @@ class AnnotatingParser {
(!NextNonComment && !Line.InMacroBody) ||
(NextNonComment &&
(NextNonComment->isPointerOrReference() ||
- NextNonComment->isOneOf(tok::identifier, tok::string_literal {
+ (Line.InPragm
@@ -8498,9 +8498,6 @@ TEST_F(FormatTest,
BreaksFunctionDeclarationsWithTrailingTokens) {
"__attribute__((unused));");
Style = getGoogleStyle();
- ASSERT_THAT(Style.AttributeMacros,
owenca wrote:
Please also delete line 10:
```
#include
@@ -1444,16 +1444,26 @@ 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)) // d
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/76675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2315,6 +2315,8 @@ bool UnwrappedLineParser::tryToParseLambdaIntroducer() {
if (Next->is(tok::greater))
return false;
}
+ if (tok::isLiteral(FormatTok->Tok.getKind()))
+return false;
owenca wrote:
```suggestion
```
Instead, I would change l
owenca wrote:
Please add an assertion in `WhitespaceManager.h`:
```
--- a/clang/lib/Format/WhitespaceManager.h
+++ b/clang/lib/Format/WhitespaceManager.h
@@ -282,6 +282,7 @@ private:
for (auto PrevIter = Start; PrevIter != End; ++PrevIter) {
// If we broke the line the initial spaces
@@ -255,6 +255,41 @@ TEST_F(FormatTestMacroExpansion,
Style);
}
+TEST_F(FormatTestMacroExpansion, CommaAsOperator) {
+ FormatStyle Style = getGoogleStyle();
+ Style.ColumnLimit = 42;
owenca wrote:
```suggestion
FormatStyle Style =
@@ -255,6 +255,41 @@ TEST_F(FormatTestMacroExpansion,
Style);
}
+TEST_F(FormatTestMacroExpansion, CommaAsOperator) {
+ FormatStyle Style = getGoogleStyle();
+ Style.ColumnLimit = 42;
+ Style.Macros.push_back("MACRO(a, b, c)=a=(b); if(x) c");
+ veri
@@ -255,6 +255,41 @@ TEST_F(FormatTestMacroExpansion,
Style);
}
+TEST_F(FormatTestMacroExpansion, CommaAsOperator) {
+ FormatStyle Style = getGoogleStyle();
+ Style.ColumnLimit = 42;
+ Style.Macros.push_back("MACRO(a, b, c)=a=(b); if(x) c");
+ veri
@@ -255,6 +255,41 @@ TEST_F(FormatTestMacroExpansion,
Style);
}
+TEST_F(FormatTestMacroExpansion, CommaAsOperator) {
+ FormatStyle Style = getGoogleStyle();
+ Style.ColumnLimit = 42;
+ Style.Macros.push_back("MACRO(a, b, c)=a=(b); if(x) c");
+ veri
@@ -255,6 +255,41 @@ TEST_F(FormatTestMacroExpansion,
Style);
}
+TEST_F(FormatTestMacroExpansion, CommaAsOperator) {
+ FormatStyle Style = getGoogleStyle();
+ Style.ColumnLimit = 42;
+ Style.Macros.push_back("MACRO(a, b, c)=a=(b); if(x) c");
+ veri
https://github.com/owenca approved this pull request.
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
@@ -1079,6 +1079,7 @@ clang-format
- Add ``ObjCPropertyAttributeOrder`` which can be used to sort ObjC property
attributes (like ``nonatomic, strong, nullable``).
- Add ``.clang-format-ignore`` files.
+- Add ``AlignFunctionPointers`` sub-option for
``AlignConsecutiveDeclarat
@@ -2315,6 +2315,8 @@ bool UnwrappedLineParser::tryToParseLambdaIntroducer() {
if (Next->is(tok::greater))
return false;
}
+ if (tok::isLiteral(FormatTok->Tok.getKind()))
+return false;
owenca wrote:
You are right! Then how about the following
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/77045
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Owen Pan
Date: 2024-01-09T21:34:21-08:00
New Revision: b53628a52d1947c51e250d6fa4ff5dd12b737aa0
URL:
https://github.com/llvm/llvm-project/commit/b53628a52d1947c51e250d6fa4ff5dd12b737aa0
DIFF:
https://github.com/llvm/llvm-project/commit/b53628a52d1947c51e250d6fa4ff5dd12b737aa0.diff
LOG:
owenca wrote:
Relanded as b53628a52d19. (See
[here](https://github.com/llvm/llvm-project/commit/42ec976184acd40436acd7104ad715c60ca3e7ed#commitcomment-136674701)).
https://github.com/llvm/llvm-project/pull/76733
___
cfe-commits mailing list
cfe-commit
Author: Owen Pan
Date: 2024-01-10T00:58:35-08:00
New Revision: c69ec700adec315b3daa55742f2ef655242fa297
URL:
https://github.com/llvm/llvm-project/commit/c69ec700adec315b3daa55742f2ef655242fa297
DIFF:
https://github.com/llvm/llvm-project/commit/c69ec700adec315b3daa55742f2ef655242fa297.diff
LOG:
owenca wrote:
> The change is done 👍 Is the code formatting check broken?
See
[here](https://github.com/llvm/llvm-project/pull/76059#issuecomment-1865850011).
https://github.com/llvm/llvm-project/pull/77456
___
cfe-commits mailing list
cfe-commits@li
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/76245
___
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/76675
___
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/69340
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> While I was trying to find a minimal reproducer to the bug, I accidentally
> found that this patch fix another crash, and doesn't fix the linked issue.
Can you open another pull request to
[fix](https://github.com/llvm/llvm-project/pull/77045#discussion_r1442578220)
the other
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/77045
___
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/77723
___
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/77704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> This still breaks tests on win: http://45.33.8.238/win/88113/step_7.txt
I didn't get any email for the failure. Is this a regular LLVM buildbot?
If it chokes on `grep -Fx`, can you (or whoever has access to it) install a
POSIX-compliant grep? It seems all other Windows buildbot
owenca wrote:
> The __attribute((specifier-list)) currently is formatted based on the
> SpacesInParensOptions.Other (previously, SpacesInParentheses). This change
> allows finer control over addition of spaces between the consecutive parens,
> and between the inner parens and the list of attri
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/76804
___
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/77723
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
101 - 200 of 1001 matches
Mail list logo