[PATCH] D149088: [clang-format] Add run-clang-format.py script.

2023-04-24 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. I guess I need to add a test in a similar that run-clang-tidy is tested, but I'd like to gather some initial review still. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149088/new/ https://reviews.llvm.org/D149088 __

[PATCH] D149088: [clang-format] Add run-clang-format.py script.

2023-04-24 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. curdeius requested review of this revision. Herald added a comment. NOTE: Clang-Format Team Automate

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/CodeGen/CodeGenTBAA.cpp:341 if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) { - // Handle C++ base classes. Non-virtual bases can treated a a kind of + // Handle C++ base classes. Non-virtual bases can treated a

[PATCH] D133589: [clang-format] JSON formatting add new option for controlling newlines in json arrays

2022-09-09 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3115 +**JsonMultilineArrays** (``Boolean``) :versionbadge:`clang-format 16` + If ``true``, clang-format will always break after a Json array `[` Why limiting to JSON only? Could

[PATCH] D133571: [clang-format] Introduce NoFallThrough option into AllowShortCaseLabelsOnASingleLine

2022-09-09 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM after fixing the last comment. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:650 + // Don't merge if the last thing on the line before was an attribut

[PATCH] D133571: [clang-format] Introduce NoFallThrough option into AllowShortCaseLabelsOnASingleLine

2022-09-09 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:935 +**AllowShortCaseLabelsOnASingleLine** (``ShortCaseLabelStyle``) :versionbadge:`clang-format 3.6` + Determine if Short case labels will be contracted to a single line. + =

[PATCH] D132762: [clang-format] Allow `throw` to be a keyword in front of casts

2022-09-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. @rymiel, please provide your name and email address for the commit message, so that we can land it for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132762/new/ https://reviews.llvm.o

[PATCH] D132295: [clang-format] Change heuristic for locating lambda template arguments

2022-09-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. @rymiel, please provide your name and email address for the commit message, so that we can land it for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132295/new/ https://reviews.llvm.o

[PATCH] D132189: [clang-format] Don't put `noexcept` on empty line following constructor

2022-09-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. @rymiel, please provide your name and email address for the commit message, so that we can land it for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132189/new/ https://reviews.llvm.o

[PATCH] D126365: [git-clang-format] Stop ignoring changes for files with space in path

2022-09-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. @Eitot, please provide your name and email address for the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126365/new/ https://reviews.llvm.org/D126365 ___ cfe-com

[PATCH] D131978: [clang-format] Concepts: allow identifiers after negation

2022-09-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. @rymiel, please provide your name and email address for the commit message, so that it can land it for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131978/new/ https://reviews.llvm.o

[PATCH] D129926: [clang-format] Handle constructor invocations after new operator in C# correct

2022-09-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. @eoanermine, please provide your name and email address for the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129926/new/ https://reviews.llvm.org/D129926 ___ cf

[PATCH] D130299: [clang-format] FIX: Misannotation 'auto' as trailing return type in lambdas

2022-07-23 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added inline comments. Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:752 +TEST_F(TokenAnnotatorTest, UnderstandsTrailingReturnTypeAutoInLabmdas) { + auto Tokens = annotate("[]() -> auto {}"); owenpan wrote:

[PATCH] D130417: [clang-format] Missing space between trailing return type 'auto' and left brace

2022-07-23 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:23555-23556 + FormatStyle Style = getLLVMStyle(); + verifyFormat("[]() -> auto { return Val; }", Style); + verifyFormat("auto foo() -> auto { return Val; }", Styl

[PATCH] D130411: [clang-format] Fix a hang when formatting C# $@ string literals

2022-07-23 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added inline comments. Comment at: clang/lib/Format/FormatTokenLexer.cpp:536 + // $"{x ?? "null"}" + // should not be split into $"{x ?? ", null, "}" but should treated as a + // single string-literal. Repository:

[PATCH] D130299: [clang-format] FIX: Misformatting lambdas with trailing return type 'auto' in braced lists

2022-07-21 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Could you please add full git context? Was the problem due to misannotation of `auto`? If so, could you add an annotator test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130299/new/ https://reviews.llvm.org/D130299 __

[PATCH] D130136: [clang-format] Indent tokens after hash only if it starts a line

2022-07-19 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130136/new/ https://reviews.llvm.org/D130136 __

[PATCH] D129940: [clang-format] Fix misannotation of colon in presence of requires clause

2022-07-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:820-833 + ASSERT_EQ(BaseTokens.size(), NumberOfBaseTokens) << BaseTokens; + ASSERT_EQ(ConstrainedTokens.size(), +NumberOfBaseTokens + NumberOfAdditionalRequiresClauseTokens) +

[PATCH] D129926: [clang-format] Handle constructor invocations after new operator in C# correct

2022-07-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. LGTM. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2864 do { + // Handle constructor invocation + if (FormatTok->is(tok::l_paren)) Nit: comments should be full phrases, ending wit

[PATCH] D129940: [clang-format] Fix misannotation of colon in presence of requires clause

2022-07-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. Ok for me if it's OK for Owen. Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:820-833 + ASSERT_EQ(BaseTokens.size(), NumberOfBaseTokens) << BaseTokens; + ASSERT_EQ(ConstrainedTokens.size(), +Num

[PATCH] D129921: [clang-format] Never remove braces in macro definitions

2022-07-16 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Nice finding! LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129921/new/ https://reviews.llvm.org/D129921 _

[PATCH] D129845: [clang-format] Allow custom attributes in access specifiers

2022-07-15 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:3298 " void f6() {}\n" "signals:\n" " void g1();\n" In the same vein, could you add test for `slots:` and `Q_SLOTS:` please? Repo

[PATCH] D129845: Allow custom attributes in access specifiers

2022-07-15 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:3304 + verifyFormat("class A {\n" + "public ATTR:\n" + " void f1() {}\n" How about multiple macros? E.g. `public ATTR1 ATTR2`? Repository: rG LLVM

[PATCH] D129466: [clang-format][NFC] Replace most of std::vector with SmallVector

2022-07-15 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:40 static unsigned getLengthToMatchingParen(const FormatToken &Tok, - const std::vector &Stack) { + const SmallV

[PATCH] D127270: [clang-format] Add space in placement new expression

2022-07-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added inline comments. Comment at: clang/include/clang/Format/Format.h:3504 +enum AfterPlacementOperatorStyle : int8_t { + /// Removes space after ``new/delete`` operators and before ``(``. + /// \code We ha

[PATCH] D129466: [clang-format][NFC] Replace most of std::vector with SmallVector

2022-07-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:40 static unsigned getLengthToMatchingParen(const FormatToken &Tok, - const std::vector &Stack) { + const SmallV

[PATCH] D129563: [docs] Document git-clang-format

2022-07-13 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. In D129563#3645343 , @thakis wrote: > (does anyone know why git-clang-format isn't implemented in terms of > clang-format-diff.py? I suppose it's

[PATCH] D129443: [clang-format] Add option for aligning requires clause body

2022-07-10 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added a comment. This revision now requires changes to proceed. Haven't you forgotten to add formatting tests? :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129443/new/ https://reviews.llvm.o

[PATCH] D129348: [clang-format] Fix an assertion failure on -lines=0:n

2022-07-08 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. 👍 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129348/new/ https://reviews.llvm.org/D129348 __

[PATCH] D129064: [clang-format] Avoid crash in LevelIndentTracker.

2022-07-07 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG14c30c70c459: [clang-format] Avoid crash in LevelIndentTracker. (authored by curdeius). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129064/new/ https://re

[PATCH] D129064: [clang-format] Avoid crash in LevelIndentTracker.

2022-07-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 442482. curdeius marked an inline comment as done. curdeius added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129064/new/ https://reviews.llvm.org/D129064 Files: clang/lib/For

[PATCH] D129064: [clang-format] Avoid crash in LevelIndentTracker.

2022-07-04 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. Herald added a project: All. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/5

[PATCH] D129057: [clang-format] Break on AfterColon only if not followed by comment

2022-07-04 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Thanks for addressing my comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129057/new/ https://reviews.llvm.org/D129057 __

[PATCH] D129057: [clang-format] Break on AfterColon only if not followed by comment

2022-07-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:7136 Style); + verifyFormat("Constructor() : // NOLINT\n" + "() {}", How about very long comments? They don't get split now? Please add a

[PATCH] D129057: [clang-format] Break on AfterColon only if not followed by comment

2022-07-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:7099 OnePerLine); - verifyFormat("SomeClass::Constructor() :\n" + verifyFormat("SomeClass::Constructor() : // NOLINT\n" "a(aa),

[PATCH] D128496: [clang-format] Further improve requires clause detection

2022-06-24 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM with Owen's suggestion. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3185-3188 - default: -// It's an expression. -parseRequiresExpression(RequiresT

[PATCH] D127873: [clang-format] Fix misplacemnt of `*` in declaration of pointer to struct

2022-06-16 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2313 +if (PrevToken->is(tok::r_brace) && Tok.isOneOf(tok::amp, tok::ampamp)) + return TT_BinaryOperator; Instead of checking for `r_brace`, maybe it would be possible to ch

[PATCH] D127270: [clang-format] Add space in placement new expression

2022-06-14 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Does this patch really fix https://github.com/llvm/llvm-project/issues/54703? If so, please add test for it. Otherwise remove the link from the summary (and if possible handle it in another review). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D127484: [clang-format] Use tabs on GNU style

2022-06-10 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. It seems like a breaking change that may be painful for users of GNU style. @mydeveloperday, wdyt? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127484/new/ https://reviews.llvm.org/D127484 __

[PATCH] D127390: [clang-format][NFC] Remove unused FormatStyle members

2022-06-09 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Good finding! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127390/new/ https://reviews.llvm.org/D127390 __

[PATCH] D127366: [clang-format][NFC] Format lib/Format and unittests/Format in clang

2022-06-08 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/unittests/Format/FormatTest.cpp:25442 "} while (hasMore() && Filter(*I));", - "do { ++I; } while (hasMore() && Filte

[PATCH] D127260: [clang-format] Remove braces of else blocks that embody an if block

2022-06-08 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Still looks good. Was there a particular case where the previous version didn't work? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127260/new/ https://reviews.llvm.org/D127260

[PATCH] D126365: [git-clang-format] Stop ignoring changes for files with space in path

2022-06-08 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. @Eitot, do you need help landing this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126365/new/ https://reviews.llvm.org/D126365 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D127260: [clang-format] Remove braces of else blocks that embody an if block

2022-06-07 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Comment at: clang/unittests/Format/FormatTest.cpp:25570-25575 + " else {\n" + "if (d) {\n" + " e;\n" +

[PATCH] D127270: [clang-format] Add space in placement new expression

2022-06-07 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Apart from some missing tests, looks promising! Comment at: clang/unittests/Format/FormatTest.cpp:15276-15286 + FormatStyle SpacePlacementNew = getLLVMStyle(); + SpacePlacementNew.SpaceBeforeParens = FormatStyle::SBPO_Custom; + SpacePlacementNew.Spa

[PATCH] D127260: [clang-format] Remove braces of else blocks that embody an if block

2022-06-07 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:25570-25575 + " else {\n" + "if (d) {\n" + " e;\n" + " f;\n" + "}\n" + " }\n"

[PATCH] D127054: [clang-format] Handle attributes for for/while loops

2022-06-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127054/new/ https://reviews.llvm.org/D127054 _

[PATCH] D126365: [git-clang-format] Stop ignoring changes for files with space in path

2022-06-01 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. Ok, I'm not blocking this patch. I'll take a look to see whether we can add some tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126365/new/ https://reviews.llvm.org/D126365

[PATCH] D126758: [clang-format] Handle do-while loops for RemoveBracesLLVM

2022-06-01 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Format/FormatTest.cpp:25103 - // The following eight test cases are fully-braced versions of the examples at + // The following nine

[PATCH] D125848: [clang-format] Handle attributes in enum declaration.

2022-05-26 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f70d16c9ab2: [clang-format] Handle attributes in enum declaration. (authored by tchatow, committed by curdeius). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D126096: [clang-format] Fix QualifierAlignment with global namespace qualified types.

2022-05-26 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd4d28f2ace76: [clang-format] Fix QualifierAlignment with global namespace qualified types. (authored by curdeius). Changed prior to commit: https://reviews.llvm.org/D126096?vs=431074&id=432258#toc Repo

[PATCH] D126438: [clang-format] Fix an invalid code generation in RemoveBracesLLVM

2022-05-25 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Good catch for this bug! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126438/new/ https://reviews.llvm.org/D126438 _

[PATCH] D125848: [clang-format] Handle attributes in enum declaration.

2022-05-25 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. LGTM. Thanks a lot! Do you have commit rights or need some help landing this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125848/new/ https://reviews.llvm.org/D125848 ___

[PATCH] D126358: clang-format][NFC] Refactor UnwrappedLineParser::parseBlock()

2022-05-25 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:874 - if (SimpleBlock && !KeepBraces) { + auto RemoveBraces = [=]() mutable { +if (KeepBraces || !Simpl

[PATCH] D126358: clang-format][NFC] Refactor UnwrappedLineParser::parseBlock()

2022-05-25 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:874 - if (SimpleBlock && !KeepBraces) { + auto RemoveBraces = [=]() mutable { +if (KeepBraces || !SimpleBlock) Are there many captures here? Wouldn't it be better to be e

[PATCH] D126365: [clang-format] Stop ignoring changes for files with space in path

2022-05-25 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Would it be possible to add a test please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126365/new/ https://reviews.llvm.org/D126365 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D126157: [clang-format][NFC] Insert/remove braces in clang/lib/Format/

2022-05-23 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2769 - if (Style.isCSharp()) { do { owenpan wrote: > From > https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop

[PATCH] D125848: [clang-format] Handle attributes in enum declaration.

2022-05-23 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Could you please add test cases with non-empty enums both with and without comments please like in the bug report? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125848/new/ https://reviews.llvm.org/D125848 __

[PATCH] D126132: [clang-format] Fix a crash on lambda trailing return type

2022-05-23 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius closed this revision. curdeius added a comment. Closing as it landed in https://github.com/llvm/llvm-project/commit/130a9cc0a5e25e3be8ff3738518e86ae3ae0b5ba. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126132/new/ https://reviews.llvm.o

[PATCH] D126157: [clang-format][NFC] Insert/remove braces in clang/lib/Format/

2022-05-22 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Ok. So we mainly missed braces on complex conditionals. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126157/new/ https://reviews.llvm

[PATCH] D126132: [clang-format] Fix a crash on lambda trailing return type

2022-05-22 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. It seems it has landed already. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126132/new/ https://reviews.llvm.org/D126132 __

[PATCH] D125959: [clang-format] Fix a bug in "AfterControlStatement: MultiLine"

2022-05-21 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:3213 Style.BraceWrapping.AfterFunction = true; - Style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_MultiLine; Style.AllowShortFunctionsOnASingleL

[PATCH] D126096: [clang-format] Fix QualifierAlignment with global namespace qualified types.

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. If you can think of other cases that may misbehave, I'll be happy to test (and fix) these. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126096/new/ https://reviews.llvm.org/D126096 __

[PATCH] D126096: [clang-format] Fix QualifierAlignment with global namespace qualified types.

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. Herald added a project: All. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/5

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Thanks! LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125961/new/ https://reviews.llvm.org/D125961 __

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D125961#3527452 , @thieta wrote: > In D125961#3527447 , @curdeius > wrote: > >> Thanks for the patch! >> Could you please add a unit test in unittest/Format/FormatTest.cpp instead >>

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added a comment. This revision now requires changes to proceed. Thanks for the patch! Could you please add a unit test in unittest/Format/FormatTest.cpp instead of in lit-based test/? Is there a bug report that your patch fixes? ===

[PATCH] D126052: [clang-format] Handle "complex" conditionals in RemoveBracesLLVM

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126052/new/ https://reviews.llvm.org/D126052 ___

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius reopened this revision. curdeius added a comment. This revision is now accepted and ready to land. Reverted for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123676/new/ https://reviews.llvm.org/D123676 __

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-16 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D123676#3515949 , @krasimir wrote: > It looks like this regressed the following example by adding an unwanted > level of indentation to the `#elif B` branch: Sure, I'll have a look. It seems that even this: MACRO_BEGIN

[PATCH] D125162: [clang-format] fix alignment w/o binpacked args

2022-05-16 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe57f57841fbb: [clang-format] fix alignment w/o binpacked args (authored by cha5on, committed by curdeius). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1251

[PATCH] D125528: [clang-format] Fix PointerAlignment: Right not working with tab indentation.

2022-05-16 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. curdeius marked an inline comment as done. Closed by commit rGe20bc892b6fa: [clang-format] Fix PointerAlignment: Right not working with tab indentation. (authored by cu

[PATCH] D125626: [clang-format][NFC] Don't call mightFitOnOneLine() unnecessarily

2022-05-15 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. I like it! Thanks! Comment at: clang/lib/Format/UnwrappedLineParser.cpp:523 + /*MunchSemi=*/true, /*KeepBraces=*/true, + /*UnindentW

[PATCH] D125593: [clang-format] Handle "if consteval { ... }" for RemoveBracesLLVM

2022-05-13 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Good finding! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125593/new/ https://reviews.llvm.org/D125593 ___ cfe-commits mailing

[PATCH] D125528: [clang-format] Fix PointerAlignment: Right not working with tab indentation.

2022-05-13 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:14222 + TabAlignment.UseTab = FormatStyle::UT_ForIndentation; + TabAlignment.AlignConsecutiveDeclarations.Enabled = true; + TabAlignment.PointerAlignment = FormatStyle::PAS_Left;

[PATCH] D125528: [clang-format] Fix PointerAlignment: Right not working with tab indentation.

2022-05-13 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. Herald added a project: All. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/5

[PATCH] D125162: [clang-format] fix alignment w/o binpacked args

2022-05-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Tell us if you need help landing this. Thanks a lot for your contribution! Comment at: clang/lib/Format/WhitespaceManager.cpp:374-375 return false; +

[PATCH] D125137: [clang-format] Don't remove braces if a 1-statement body would wrap

2022-05-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:787 + + const int Length = LastToken->TotalLength; + owenpan wrote: > curdeius wrote: > > Why not like this? > > Why not like this? > > See the assertion on line 781 above. We

[PATCH] D125137: [clang-format] Don't remove braces if a 1-statement body would wrap

2022-05-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM with nits. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:766 + assert(!Tokens.empty()); + const auto *LastToken = Tokens.back().Tok; + assert(LastToken); -

[PATCH] D123896: [clang-format] fix nested angle brackets parse inside concept definition

2022-05-11 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdab5e10ea5db: [clang-format] fix nested angle brackets parse inside concept definition (authored by predelnik, committed by curdeius). Repository:

[PATCH] D123896: [clang-format] fix nested angle brackets parse inside concept definition

2022-05-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Do you need help landing this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123896/new/ https://reviews.llvm.org/D123896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D125162: [clang-format] fix alignment w/o binpacked args

2022-05-10 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Thanks for creating the bug report. A few more comments. Comment at: clang/lib/Format/WhitespaceManager.cpp:374-375 return false; + if (Changes[i].Tok->is(tok::l_brace) && + Changes[i].Tok->is(BK_BracedInit)) +

[PATCH] D125085: [clang-format] Correctly handle SpaceBeforeParens for builtins.

2022-05-09 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG85ec8a9ac141: [clang-format] Correctly handle SpaceBeforeParens for builtins. (authored by curdeius). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D125085: [clang-format] Correctly handle SpaceBeforeParens for builtins.

2022-05-09 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 428009. curdeius marked an inline comment as done. curdeius added a comment. Address comment: simplify. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125085/new/ https://reviews.llvm.org/D125085 Files: clan

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-09 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG50cd52d93572: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro… (authored by curdeius). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D125162: [clang-format] fix alignment w/o binpacked args

2022-05-07 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. FYI, I like to have a bug report because people that encounter the same problem (in an older release) can find it easily, and see if/when it was fixed. It also avoid working on the same thing by different people. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D125162: [clang-format] fix alignment w/o binpacked args

2022-05-07 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added a comment. This revision now requires changes to proceed. Thanks for working on this! Is there a bug report somewhere? If not, may you create one please? Comment at: clang/lib/Format/WhitespaceManager.cpp:398 +

[PATCH] D125085: [clang-format] Correctly handle SpaceBeforeParens for builtins.

2022-05-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. Herald added a project: All. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. That's a partial fix for https://github.com/llvm/ll

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius marked 5 inline comments as done. curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:23545 + // Newlines are important here. + EXPECT_EQ("FOO(1+2 );\n", format("FOO(1+2 );\n", Style)); + EXPECT_EQ("FOO(1+2 )\n", format("FOO(1+2 )\n",

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 427566. curdeius added a comment. Simplify. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123676/new/ https://reviews.llvm.org/D123676 Files: clang/lib/Format/FormatTokenLexer.cpp clang/

[PATCH] D125064: [clang-format][NFC] Make all TokenAnnotator member functions const

2022-05-05 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125064/new/ https://reviews.llvm.org/D125064 ___

[PATCH] D124956: [clang-format] Fix another bug in AlignConsecutiveAssignments

2022-05-04 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Just one last thought, shouldn't we have a test case close to what was reported in the issue? I.e. with PP directives. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124956/new/ https://reviews.llvm.org/D124956 __

[PATCH] D124956: [clang-format] Fix another bug in AlignConsecutiveAssignments

2022-05-04 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124956/new/ https://reviews.llvm.org/D124956 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D124868: [clang-format] Fix a bug in AlignConsecutiveAssignments

2022-05-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Looks ok, but please let someone else have a look too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124868/new/ https://reviews.llvm.org/D1

[PATCH] D124818: [clang-format][NFC] Clean up tryToParseLambdaIntroducer()

2022-05-02 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124818/new/ https://reviews.llvm.org/D124818 __

[PATCH] D116527: [clang-format] Fix indentation for array variables with alignment of consecutive assignments and declarations.

2022-04-28 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Feel free to revert and add a regression test please. I'll take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116527/new/ https://reviews.llvm.org/D116527 ___ cfe-commit

[PATCH] D124589: [clang-format] Fix a bug that misformats Access Specifier after *[]

2022-04-28 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:3342 + "public:\n" + " std::unique_ptr b() { return nullptr; }\n" + "\n" How about `int const *`, `const int*`? Is `const` & co. a simple

[PATCH] D124589: [clang-format] Fix a bug that misformats Access Specifier after *[]

2022-04-27 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Looks more or less correct, but I am afraid that this change may misbehave in some rare cases. Consider `*[](auto *x) { return x; }();`, so an immediately invoked lambda returning a pointer. It seems to be correctly formatted currently, but I don't see any test on it. C

[PATCH] D124452: [clang-format] Adjust editor cursor position past #include blocks

2022-04-26 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Looks ok, but I'm not very familiar with this part of clang-format, so please leave some time for others to chime in. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D124282: [git-clang-format] Add some examples to the help text

2022-04-22 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124282/new/ https://reviews.llvm.org/D124282 ___ cfe-commits mailing list cfe-comm

  1   2   3   4   5   6   7   8   9   >