[clang] [clang-format] Fix broken dump_format_help.py and sync the RST file (PR #65429)

2023-09-06 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/65429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7a38b3b - [clang-format] Respect ColumnLimit 0 line breaks in inline asm

2023-06-23 Thread Emilia Kond via cfe-commits
Author: Emilia Kond Date: 2023-06-23T17:30:24+03:00 New Revision: 7a38b3bfeb5623fb970a03ed9f295288802f4506 URL: https://github.com/llvm/llvm-project/commit/7a38b3bfeb5623fb970a03ed9f295288802f4506 DIFF: https://github.com/llvm/llvm-project/commit/7a38b3bfeb5623fb970a03ed9f295288802f4506.diff L

[clang] 6e39b0d - [clang-format][NFC] Use correct test method for new tests

2023-06-26 Thread Emilia Kond via cfe-commits
Author: Emilia Kond Date: 2023-06-26T12:27:57+03:00 New Revision: 6e39b0ddf08ab5cd44fed2d16e9669d64aa733ef URL: https://github.com/llvm/llvm-project/commit/6e39b0ddf08ab5cd44fed2d16e9669d64aa733ef DIFF: https://github.com/llvm/llvm-project/commit/6e39b0ddf08ab5cd44fed2d16e9669d64aa733ef.diff L

[clang] 15e14f1 - [clang-format] Preserve AmpAmpTokenType in nested parentheses

2023-06-26 Thread Emilia Kond via cfe-commits
Author: Emilia Kond Date: 2023-06-26T12:39:16+03:00 New Revision: 15e14f129fe24db989ed91737e96505863e20c60 URL: https://github.com/llvm/llvm-project/commit/15e14f129fe24db989ed91737e96505863e20c60 DIFF: https://github.com/llvm/llvm-project/commit/15e14f129fe24db989ed91737e96505863e20c60.diff L

[clang] 4986f3f - [clang-format] Correctly annotate operator free function call

2023-06-29 Thread Emilia Kond via cfe-commits
Author: Emilia Kond Date: 2023-06-29T19:51:27+03:00 New Revision: 4986f3f2f220e4fd2fef4b08e550b399c9f45a9f URL: https://github.com/llvm/llvm-project/commit/4986f3f2f220e4fd2fef4b08e550b399c9f45a9f DIFF: https://github.com/llvm/llvm-project/commit/4986f3f2f220e4fd2fef4b08e550b399c9f45a9f.diff L

[clang] e4d3e88 - [clang-format] Don't allow template to be preceded by closing brace

2023-05-16 Thread Emilia Kond via cfe-commits
Author: Emilia Kond Date: 2023-05-17T01:37:19+03:00 New Revision: e4d3e88802390a51ae62ade18e48c1a65a862d12 URL: https://github.com/llvm/llvm-project/commit/e4d3e88802390a51ae62ade18e48c1a65a862d12 DIFF: https://github.com/llvm/llvm-project/commit/e4d3e88802390a51ae62ade18e48c1a65a862d12.diff L

[clang] 06763ea - [clang-format] Ignore first token when finding MustBreak

2023-05-17 Thread Emilia Kond via cfe-commits
Author: Emilia Kond Date: 2023-05-18T05:50:26+03:00 New Revision: 06763ea5d8f96625545bb2c2445363aca9922bf1 URL: https://github.com/llvm/llvm-project/commit/06763ea5d8f96625545bb2c2445363aca9922bf1 DIFF: https://github.com/llvm/llvm-project/commit/06763ea5d8f96625545bb2c2445363aca9922bf1.diff L

[clang] [clang-format] Fix crash in TokenAnnotator (PR #82349)

2024-02-20 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/82349 The while loop on line 3814 can cause a segmentation fault getting the Next field on a nullptr. This is because further down, on line 3823, there is another for loop, which assigns Tok to Tok->Next in its initial

[clang] [clang-format] Fix crash in TokenAnnotator (PR #82349)

2024-02-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/82349 >From 25ca98534f0d5dbd96ff74c802528171787ced45 Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Tue, 20 Feb 2024 14:11:33 +0200 Subject: [PATCH 1/2] [clang-format] Fix crash in TokenAnnotator The while loop on li

[clang] [clang-format] Fix crash in TokenAnnotator (PR #82349)

2024-02-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/82349 >From 25ca98534f0d5dbd96ff74c802528171787ced45 Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Tue, 20 Feb 2024 14:11:33 +0200 Subject: [PATCH 1/3] [clang-format] Fix crash in TokenAnnotator The while loop on li

[clang] [clang-format] Fix crash in TokenAnnotator (PR #82349)

2024-02-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/82349 >From 25ca98534f0d5dbd96ff74c802528171787ced45 Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Tue, 20 Feb 2024 14:11:33 +0200 Subject: [PATCH 1/4] [clang-format] Fix crash in TokenAnnotator The while loop on li

[clang] [clang-format] Fix crash in TokenAnnotator (PR #82349)

2024-02-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/82349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Enable RemoveSemicolon for clang-format style (PR #82735)

2024-02-23 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/82735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix annotation of braces enclosing stringification (PR #102998)

2024-08-13 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. 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

[clang] [Clang Format] Fixing erroneous statements in tests; nsc (PR #88628)

2024-04-13 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/88628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/94560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-09 Thread Emilia Kond via cfe-commits
rymiel wrote: Technically also applies to attributes applied to the return type of the lambda, i.e. ``` int main() { very_long_function_name_yes_it_is_really_long( // also happens with constexpr specifier [](auto n) [[attribute]] -> std::enable_if_t< std::is_arithme

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/95025 In ContinuationIndenter::mustBreak, a break is required between a template declaration and the function/class declaration it applies to, if the template declaration spans multiple lines. However, this also inclu

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-10 Thread Emilia Kond via cfe-commits
rymiel wrote: Note: I understand my solution of adding a member variable is inelegant, I am of course open to ways on making it better https://github.com/llvm/llvm-project/pull/95025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel edited https://github.com/llvm/llvm-project/pull/95025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating lambda l_square (PR #95084)

2024-06-11 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/95084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating lambda l_square (PR #95084)

2024-06-11 Thread Emilia Kond via cfe-commits
@@ -1591,6 +1591,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsLambdas) { EXPECT_TOKEN(Tokens[15], tok::arrow, TT_TrailingReturnArrow); EXPECT_TOKEN(Tokens[17], tok::l_brace, TT_LambdaLBrace); + Tokens = annotate("auto l = [] -> struct S { return {}; };");

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-11 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/95025 >From 6fc09d022a0e4e395a1b8e17166641dffc7c12eb Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Mon, 10 Jun 2024 22:17:29 +0300 Subject: [PATCH 1/2] [clang-format] Don't count template template parameter as decla

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-11 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/95025 >From 6fc09d022a0e4e395a1b8e17166641dffc7c12eb Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Mon, 10 Jun 2024 22:17:29 +0300 Subject: [PATCH 1/3] [clang-format] Don't count template template parameter as decla

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-12 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/95025 >From 6fc09d022a0e4e395a1b8e17166641dffc7c12eb Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Mon, 10 Jun 2024 22:17:29 +0300 Subject: [PATCH 1/4] [clang-format] Don't count template template parameter as decla

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-12 Thread Emilia Kond via cfe-commits
@@ -584,6 +584,23 @@ TEST_F(TokenAnnotatorTest, UnderstandsNonTemplateAngleBrackets) { EXPECT_TOKEN(Tokens[20], tok::greater, TT_BinaryOperator); } +TEST_F(TokenAnnotatorTest, UnderstandsTemplateTemplateParameters) { + auto Tokens = annotate("template typename X,\n" +

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-12 Thread Emilia Kond via cfe-commits
@@ -1269,10 +1269,17 @@ class AnnotatingParser { if (CurrentToken && CurrentToken->is(tok::less)) { CurrentToken->setType(TT_TemplateOpener); next(); - if (!parseAngle()) + TemplateDeclarationDepth++; + if (!parseAngle()) { +TemplateDeclar

[clang] [clang-format] Fix misannotations of `<` in ternary expressions (PR #100980)

2024-07-29 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. Wow! https://github.com/llvm/llvm-project/pull/100980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix misannotations of `<` in ternary expressions (PR #100980)

2024-07-29 Thread Emilia Kond via cfe-commits
https://github.com/rymiel edited https://github.com/llvm/llvm-project/pull/100980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix misannotations of `<` in ternary expressions (PR #100980)

2024-07-29 Thread Emilia Kond via cfe-commits
@@ -176,31 +176,38 @@ class AnnotatingParser { FormatToken *Left = CurrentToken->Previous; Left->ParentBracket = Contexts.back().ContextKind; ScopedContextCreator ContextCreator(*this, tok::less, 12); - Contexts.back().IsExpression = false; + +const auto *B

[clang] [clang-format] Fix a bug in SpaceBeforeParensOptions (PR #98849)

2024-07-14 Thread Emilia Kond via cfe-commits
rymiel wrote: Are there tests for #98820? https://github.com/llvm/llvm-project/pull/98849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't remove parentheses of fold expressions (PR #91045)

2024-05-04 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. I can definitely think of cases where an expression might contain `...` and still have redundant parentheses, i.e. if the ellipsis isn't part of a fold expression For example: ```c++ template std::tuple foo() { return (std::tuple{}); }

[clang] [clang-format] Don't allow comma in front of structural enum (PR #91056)

2024-05-04 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/91056 Assume that a comma in front of `enum` means it is actually a part of an elaborated type in a template parameter list. Fixes https://github.com/llvm/llvm-project/issues/47782 >From f625311fe7259a07607cc2bb8c13e0

[clang] [clang-format] Don't allow comma in front of structural enum (PR #91056)

2024-05-05 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/91056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Java switch expressions (PR #91112)

2024-05-06 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. Also works well for pattern matching ```java switch (obj) { case String s when !s.isEmpty() -> 0; default -> 1; } ``` and upcoming destructuring ```java switch (n) { case IntExpr(int i) -> i; case N

[clang] [clang-format] Correctly annotate C++ alternative operators in C (PR #92880)

2024-05-21 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/92880 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a misannotation of redundant r_paren as CastRParen (PR #105921)

2024-08-24 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/105921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a misannotation of less/greater as angle brackets (PR #105941)

2024-08-24 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/105941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/95025 >From 6fc09d022a0e4e395a1b8e17166641dffc7c12eb Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Mon, 10 Jun 2024 22:17:29 +0300 Subject: [PATCH 1/5] [clang-format] Don't count template template parameter as decla

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-22 Thread Emilia Kond via cfe-commits
@@ -1269,10 +1269,17 @@ class AnnotatingParser { if (CurrentToken && CurrentToken->is(tok::less)) { CurrentToken->setType(TT_TemplateOpener); next(); - if (!parseAngle()) + TemplateDeclarationDepth++; + if (!parseAngle()) { +TemplateDeclar

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/95025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't count template template parameter as declaration (PR #96396)

2024-06-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/96396 Reapply 4a7bf42a9b83144db8a11ac06cce4da21166e6a2 which was reverted in 34d44eb41dfbbbf01712719558b02763334fbeb3 Not sure why there are tests elsewhere in clang that rely on the output of clang-format, but they we

[clang] [clang-format] Don't count template template parameter as declaration (PR #96396)

2024-06-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/96396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't count template template parameter as declaration (PR #96396)

2024-06-24 Thread Emilia Kond via cfe-commits
rymiel wrote: Isn't fixing bugs meant to change defaults? See #61732, #48746 and #93793. The old version is confusing since it looks like a separate template parameter when it isn't. https://github.com/llvm/llvm-project/pull/96396 ___ cfe-commits mai

[clang] [clang-format] Allow ternary in all templates (PR #96801)

2024-06-26 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/96801 Currently, question mark and colon tokens are not allowed between angle brackets, as a template argument, if we are in an expression context. However, expressions can still allowed in non-expression contexts, lea

[clang] [clang-format] Allow ternary in all templates (PR #96801)

2024-06-26 Thread Emilia Kond via cfe-commits
rymiel wrote: I'm not even sure if this change is a good idea! I think it's very likely it will lead to regressions, for we don't have tests for such cases yet, it seems https://github.com/llvm/llvm-project/pull/96801 ___ cfe-commits mailing list cfe-

[clang] [clang-format] Allow ternary in all templates (PR #96801)

2024-06-29 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/96801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/110942 >From ef604d0bd621cfef32a8dd4b5410bd530ed2fe80 Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Thu, 3 Oct 2024 03:06:10 +0300 Subject: [PATCH 1/2] [clang-format] Make some binary operations imply requires claus

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel edited https://github.com/llvm/llvm-project/pull/110942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel edited https://github.com/llvm/llvm-project/pull/110942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-30 Thread Emilia Kond via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-21 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/110942 >From ef604d0bd621cfef32a8dd4b5410bd530ed2fe80 Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Thu, 3 Oct 2024 03:06:10 +0300 Subject: [PATCH 1/3] [clang-format] Make some binary operations imply requires claus

[clang] [clang-format] Annotate ::operator as FunctionDeclarationName (PR #111115)

2024-10-04 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/15 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-22 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/110942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-02 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/110942 This patch adjusts the requires clause/expression lookahead heuristic to assume that some binary operation mean that the requires keyword refers to a clause. This partially reverts the removed case clauses from

[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-03 Thread Emilia Kond via cfe-commits
@@ -3528,6 +3528,17 @@ bool UnwrappedLineParser::parseRequires() { return false; } break; +case tok::equalequal: +case tok::greaterequal: +case tok::lessequal: +case tok::r_paren: +case tok::pipepipe: + if (OpenAngles == 0) { +

[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-03 Thread Emilia Kond via cfe-commits
@@ -3528,6 +3528,17 @@ bool UnwrappedLineParser::parseRequires() { return false; } break; +case tok::equalequal: +case tok::greaterequal: +case tok::lessequal: +case tok::r_paren: +case tok::pipepipe: + if (OpenAngles == 0) { +

[clang] [clang-format] Fix a bug that misannotates binary operators */&/&& (PR #110945)

2024-10-03 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/110945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-03 Thread Emilia Kond via cfe-commits
@@ -3528,6 +3528,17 @@ bool UnwrappedLineParser::parseRequires() { return false; } break; +case tok::equalequal: +case tok::greaterequal: +case tok::lessequal: +case tok::r_paren: +case tok::pipepipe: + if (OpenAngles == 0) { +

[clang] [clang-format] Handle C-style cast of qualified type (PR #108929)

2024-09-17 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/108929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a crash on parsing requires clause (PR #125021)

2025-01-30 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/125021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-01-31 Thread Emilia Kond via cfe-commits
rymiel wrote: Seems to also work for top-level types (`::int_64_t constexpr x{123};` works correctly) but breaks for fully qualified types (`::std::int64_t constexpr x{123};` becomes `::constexpr std::int64_t x{123};`) https://github.com/llvm/llvm-project/pull/125327 __

[clang] [clang-format] Fix a crash in `QualifierAlignment: Right` (PR #120821)

2024-12-21 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/120821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in `PointerAlignment: Left` (PR #124085)

2025-01-23 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/124085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add `TT_CompoundRequirementLBrace` for better annotation (PR #121539)

2025-01-04 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. #121675 https://github.com/llvm/llvm-project/pull/121539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add `TT_CompoundRequirementLBrace` for better annotation (PR #121539)

2025-01-04 Thread Emilia Kond via cfe-commits
rymiel wrote: This is a good fix but I think it might not be addressing the whole issue. This isn't a problem with just *compound-requirement*, it's the case for *simple-requirement*s too. This is valid: ```c++ template concept Multiplicable = requires(T a, T b) { a * b; }; ``` but clang-form

[clang] [clang-format][NFC] Add missing config tests for List of Strings (PR #121451)

2025-01-04 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. these tests are so inconsistent but I guess it's not that critical https://github.com/llvm/llvm-project/pull/121451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang-format] Skip line splices when sorting C++ includes (PR #120680)

2024-12-23 Thread Emilia Kond via cfe-commits
@@ -3246,8 +3246,15 @@ tooling::Replacements sortCppIncludes(const FormatStyle &Style, StringRef Code, SmallVector RawStringMatches; std::string RawStringTermination = ")\""; - for (;;) { -auto Pos = Code.find('\n', SearchFrom); + for (const auto Size = Code.size();

<    1   2