[PATCH] D93240: [clang-format] Add SpaceBeforeCaseColon option

2020-12-15 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks added a comment. In D93240#2454268 , @MyDeveloperDay wrote: > I generally don't have the same aversion to new options than others have, but > can you point out a style guide that mig

[PATCH] D93490: [clang-format] PR48539 ReflowComments breaks Qt translation comments

2020-12-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a reviewer: HazardyKnusperkeks. HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added a comment. This revision now requires changes to proceed. I don't know if this really fixes the problem. From the Docs: > An alternative way to attach meta-dat

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2020-12-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D93528#2462969 , @MyDeveloperDay wrote: > So I guess my question is: > > 1. is this useful to pursue (either as is, or by switching to us the reformat > method) > 2. is this useful standalone as the first pass > 3.

[PATCH] D93170: [clang-format][NFC] Expand BreakBeforeBraces examples

2020-12-18 Thread Björn Schäpers 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 rG5e5ef5359742: [clang-format][NFC] Expand BreakBeforeBraces examples (authored by HazardyKnusperkeks). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D93240: [clang-format] Add SpaceBeforeCaseColon option

2020-12-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 312877. HazardyKnusperkeks added a comment. Test case adapted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93240/new/ https://reviews.llvm.org/D93240 Files: clang/docs/ClangFormatStyleOptions.rs

[PATCH] D87587: [clang-format][PR47290] Add MaxUnwrappedLinesForShortNamespace format option

2020-12-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2463 +**MaxUnwrappedLinesForShortNamespace** (``unsigned``) + The maximal number of unwrapped lines that a short namespace spans. curdeius wrote: > MyDeveloperDay wrot

[PATCH] D93626: [clang-format] PR48535 clang-format Incorrectly Removes Space After C Style Cast When Type Is Not a Pointer

2020-12-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1976 + tok::kw_co_yield, tok::equal, tok::kw_delete, + tok::kw_sizeof, tok::kw_throw) || PrevToken->isOneOf(TT_BinaryOperator, TT

[PATCH] D93490: [clang-format] PR48539 ReflowComments breaks Qt translation comments

2020-12-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. So, I've tested a bit: //= Die ID //~ foo bar //~ EinWort Ein langer Text der fortgesetzt wird //: Dies ist ein langer Kommentar //: der umgebrochen wird tr("Foo"); Results in Foo Dies ist ein langer Kommentar der umgebrochen

[PATCH] D93490: [clang-format] PR48539 ReflowComments breaks Qt translation comments

2020-12-22 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. This looks good to me. In D93490#2468351 , @JVApen wrote: > In D93490#2467733 , @MyDev

[PATCH] D93163: [clang-format] Fix handling of ## comments in TextProto

2020-12-23 Thread Björn Schäpers 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 rG374f1d81febf: [clang-format] Fix handling of TextProto comments (authored by HazardyKnusperkeks). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D93240: [clang-format] Add SpaceBeforeCaseColon option

2020-12-23 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG47877c9079c2: [clang-format] Add SpaceBeforeCaseColon option (authored by HazardyKnusperkeks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93240/new/ http

[PATCH] D93776: [clang-format] Add StatementAttributeLikeMacros option

2020-12-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: MyDeveloperDay, curdeius, JVApen. HazardyKnusperkeks added a project: clang-format. HazardyKnusperkeks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This allows

[PATCH] D93776: [clang-format] Add StatementAttributeLikeMacros option

2020-12-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/FormatToken.h:54 TYPE(FunctionTypeLParen) \ + TYPE(StatementAttributeLikeMacro) \ TYPE(ImplicitStringLite

[PATCH] D93776: [clang-format] Add StatementAttributeLikeMacros option

2020-12-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D93776#2470524 , @curdeius wrote: > Seems okay at the first glance. I'm wondering if we can find a better name > though. I'm all in for a better name. :) I could not think of any (my first shot was `IgnoredMacros`,

[PATCH] D93806: [clang-format] PR48569 clang-format fails to align case label with `switch` with Whitesmith Indentation

2020-12-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a reviewer: HazardyKnusperkeks. HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. If that's how it's supposed to look, than this patch is fine. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 313774. HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks edited the summary of this revision. HazardyKnusperkeks added a comment. I'm back! I've reworked the change to correctly(*) work with line comment sections. *: That is

[PATCH] D91507: [clang-format] Add option for case sensitive regexes for sorted includes

2020-11-15 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: ioeric, MyDeveloperDay. HazardyKnusperkeks added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. HazardyKnusperkeks requested review of this revision. I think the title say

[PATCH] D91507: [clang-format] Add option for case sensitive regexes for sorted includes

2020-11-16 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Do I have to do something? For me it doesn't look like the build failure is due to my changes. Locally I've only build and run the FormatTests target. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91507/new/ ht

[PATCH] D91507: [clang-format] Add option for case sensitive regexes for sorted includes

2020-11-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 307142. HazardyKnusperkeks edited the summary of this revision. HazardyKnusperkeks added a comment. I've rebased it to master, ran the documentation script and have build the targets clang-format clang-tidy pp-trace clang-include-fixer clangd clang

[PATCH] D91996: [clang-format] Remove double trim

2020-11-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: MyDeveloperDay, krasimir, klimek. HazardyKnusperkeks added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. HazardyKnusperkeks requested review of this revision. Repository:

[PATCH] D91507: [clang-format] Add option for case sensitive regexes for sorted includes

2020-11-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Thanks, than someone needs to commit it. Regards Björn. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91507/new/ https://reviews.llvm.org/D91507 ___ cfe-commits mail

[PATCH] D91996: [clang-format] Remove double trim

2020-11-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D91996#2417892 , @klimek wrote: > Isn't the comment incorrect after this patch? I actually thought the same after I saw the diff here, but had no time yet to modify it. I will now also remove the comment. Reposito

[PATCH] D91996: [clang-format] Remove double trim

2020-11-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 308134. HazardyKnusperkeks added a comment. Formatted and now superfluous comment removed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91996/new/ https://reviews.llvm.org/D91996 Files: clang/lib

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-11-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: MyDeveloperDay, klimek, krasimir. HazardyKnusperkeks added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. HazardyKnusperkeks requested review of this revision. I'm not sur

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-11-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2727 + + * ``unsigned Maximum`` The maximum number of spaces at the start of the comment. + MyDeveloperDay wrote: > I'm personally not a massive fan of stuffing -1 into

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-11-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked 2 inline comments as done. HazardyKnusperkeks added a comment. In D92257#2422381 , @MyDeveloperDay wrote: > I think fundamentally from my perspective this seem ok, out of interest can I > ask what drove you to require it? > > My

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-11-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/BreakableToken.cpp:790 + (Style.Language != FormatStyle::LK_TextProto || + OriginalPrefix[i].substr(0, 2) != "##")) { +Prefix[i] = IndentPrefix.str(); HazardyKnusper

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2710 +**SpacesInLineComments** (``SpacesInLineComment``) + How many spaces are allowed at the start of a line comment. To disable the MyDeveloperDay wrote: > Is this c

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/Format.cpp:963 LLVMStyle.SpacesInCStyleCastParentheses = false; + LLVMStyle.SpacesInLineComments = {/*Minimum=*/1, /*Maximum=*/-1u}; LLVMStyle.SpaceAfterCStyleCast = false; curdeius wro

[PATCH] D92666: [clang-format] [NFC] keep clang-format tests clang-format clean

2020-12-04 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Why is the file mode changed? As far as I know this makes the file executable? (Disclaimer: I'm a primarly windows user.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92666/new/ https://reviews.llvm.org/D92666

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-06 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D92257#2435701 , @MyDeveloperDay wrote: > Can I assume you need someone to land this for you? Yes I do. But I have a question, my last change is commited in your name, that means git blame would blame it on you, ri

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-06 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D92257#2435902 , @MyDeveloperDay wrote: > In D92257#2435899 , > @HazardyKnusperkeks wrote: > >> In D92257#2435701 , @MyDeveloperDay

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-07 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked 6 inline comments as done. HazardyKnusperkeks added a comment. In D92257#2435906 , @lebedev.ri wrote: > In D92257#2435902 , @MyDeveloperDay > wrote: > >> In D92257#2435899

[PATCH] D102392: [clang-format] PR50326 AlignAfterOpenBracket AlwaysBreak does not keep to the ColumnLimit

2021-05-13 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. I second that ColumnLimit breaking test case. :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102392/new/ https://reviews.llvm.org/D102392

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Maybe a bit more test cases with smaller lambdas? Or without the outer parenthesis? Comment at: clang/include/clang/Format/Format.h:2456 + enum LambdaBodyIndentationKind : unsigned char { +/// Align lambda body relative to the lambda si

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D102706#2766871 , @vlovich wrote: > In D102706#2766680 , > @HazardyKnusperkeks wrote: > >> Maybe a bit more test cases with smaller lambdas? Or without the outer >> parenth

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Looks good, but please add a test with the `else IF` and just `else` case. Also for me it would be ok to add your `KJ_IF_MAYBE` to the default configuration. But I have no experience on that. Comment at: clang/include/clang/Format/Format.h:

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-22 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:2983 /// \endcode -SBPO_ControlStatementsExceptForEachMacros, +SBPO_ControlStatementsExceptControlMacros, /// Put a space before opening parentheses only if the parentheses

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D101868#2775550 , @feg208 wrote: > This reworks substantially this commit. I recognize there are lacking/broken > tests but I just would like to ensure that the general direction doesn't > seem likely to end in tears

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D101868#2777423 , @feg208 wrote: > In D101868#2776633 , > @HazardyKnusperkeks wrote: > >> In D101868#2775550 , @feg208 wrote: >> >>

[PATCH] D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set

2021-05-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/TokenAnnotator.cpp:3496-3501 + assert(!Tok.is(tok::l_brace) || !Tok.is(BK_Block) || + !Tok.isOneOf

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-05-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Although verifyFormat is nice, I would add some EXPECT_EQ to show that the braces are really inserted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95168/new/ https://reviews.llvm.org/D95168 __

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/FormatToken.cpp:86 + (SplitMax > 0 && SplitMax < ColumnWidth) ? SplitMax : ColumnWidth; + ColWidth += (is(tok::comment)) ? 1 : 0; + const auto *NextColEntry = Next; Personal style, don'

[PATCH] D103204: [clang-format] New BreakInheritanceList style AfterComma

2021-05-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:1839 +/// \endcode +BILS_AfterComma }; Maybe add a comma, so that the next addition will not need to modify this line? Repository: rG LLVM Github Monorepo CH

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:16478 + "{56, /* a comment */ 23, \"hello\" },\n" + "{-1, 93463, \"world\" },\n" + "{ 7, 5,\"!!\" }\

[PATCH] D102706: [clang-format] Add new LambdaBodyIndentation option

2021-05-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. LGTM, but please wait for more responses. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102706/new/ https://reviews.llvm.org/D102706 _

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-05-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Looks quite solid for me. Comment at: clang/lib/Format/WhitespaceManager.cpp:265 static void -AlignTokenSequence(unsigned Start, unsigned End, unsigned Column, F &&Matches, +AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsign

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-05-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:14884 Alignment.AlignConsecutiveDeclarations = FormatStyle::ACS_None; + Alignment.PointerAlignment = FormatStyle::PAS_Right; verifyFormat("float const a = 5;\n" ger

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-05-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please just check `continue`, I would like to make it a separate commit, because it seems unrelated to me. Otherwise this is good. Comment at: clang/lib/Format/WhitespaceManager.cpp:369 assert(Shift >= 0); +if (Shift == 0) + co

[PATCH] D103286: [clang-format] Add PPIndentWidth option

2021-05-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added a comment. This revision now requires changes to proceed. Love it! But this will result in unexpected (one might say breaking) behaviour, if someone set `IndentWidth` to a different value than his base style and upda

[PATCH] D103286: [clang-format] Add PPIndentWidth option

2021-05-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:2336 + /// \endcode + unsigned PPIndentWidth; + I prefer alphabetical sorting, I know there are some entries which aren't sorted. Repository: rG LLVM Github Monorepo

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-05-31 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Thank you very much. :) Do you have commit access, or do you need someone to land it? If the latter please state name and email for the commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D103286: [clang-format] Add PPIndentWidth option

2021-05-31 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Looks good to me, I would just change the wording a bit. Could you please also add a entry in the ReleaseNotes.rst? Comment at: clang/include/clang/F

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-05-31 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Forgot about that: Please add an entry in the ReleaseNotes.rst, I can imagine there are some people out there waiting for this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103245/new/ https://reviews.llvm.org/

[PATCH] D88084: [clang-format] Changed default styles BraceWrappping bool table to directly use variables

2021-05-31 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Under "Related Objects" you can add the commit, so that one can navigate to it. And as action there is "Close Revision", which marks this as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88084/new/ https:/

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-06-01 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Will do on Thursday. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103245/new/ https://reviews.llvm.org/D103245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations

2021-06-01 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:14921 + verifyFormat("unsigned int *a;\n" + "int*b;\n" "unsigned int Const *c;\n" MyDeveloperDay wrote: > I seem to re

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-06-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added a comment. This revision now requires changes to proceed. I've added a few comments, and I would like to hear the opinion of others regarding the left or right alignment of the elements. Comment at

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-06-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:737-740 +const auto End = Contexts.rbegin() + 2; +auto Last = Contexts.rbegin(); +unsigned Depth = 0; +for (; Last != End; Last = std::next(Last)) { I actual

[PATCH] D103589: [Format] Fix incorrect pointer detection

2021-06-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Seems reasonable. :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103589/new/ https://reviews.llvm.org/D103589 ___ cfe-comm

[PATCH] D95017: [clang-format] add case aware include sorting

2021-01-22 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. I can push that, but will wait a bit longer so the others have time to object. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95017/new/ https://reviews.llvm.org/D95017 ___

[PATCH] D93986: [clang-format] Add the possibility to align assignments spanning empty lines or comments

2021-01-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. I did not re-accept this, because of the script change. I'm okay with it, but I never looked really at the script. I think it should be changed afterwards to error or warn again, but not on this enum. Maybe one could

[PATCH] D93846: [clang-format] PR16518 Add flag to suppress empty line insertion before access modifier

2021-01-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Do you need someone to push this? If so please post email and name to use for the commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93846/new/ https://reviews.llvm.org/D93846 ___

[PATCH] D95078: [clang-format] [NFC] Use some constexpr StringRef instead of const char*.

2021-01-25 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6cb288797122: [clang-format] [NFC] Use some constexpr StringRef (authored by HazardyKnusperkeks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95078/new/ h

[PATCH] D95081: [clang-format] [NFC] Restructure getLineCommentIndentPrefix

2021-01-25 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c8b9c102f38: [clang-format] [NFC] Restructure getLineCommentIndentPrefix (authored by HazardyKnusperkeks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D950

[PATCH] D93846: [clang-format] PR16518 Add flag to suppress empty line insertion before access modifier

2021-01-25 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG60bf5826cfd3: [clang-format] PR16518 Add flag to suppress empty line insertion before access… (authored by thezbyg, committed by HazardyKnusperkeks). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D95017: [clang-format] add case aware include sorting

2021-01-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2286 +**IncludeSortAlphabetically** (``bool``) + Specify if sorting should be done in an alphabetical and + case sensitive fashion. MyDeveloperDay wrote: > curdeius wro

[PATCH] D95128: [clang-format] [NFC] Remove unused arguments

2021-01-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks closed this revision. HazardyKnusperkeks added a comment. Commited but forgot the Differential Link in the Message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95128/new/ https://reviews.llvm.org/D95128 ___

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-01-28 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG078f30e04d1f: [clang-format] Add option to control the spaces in a line comment (authored by HazardyKnusperkeks). Changed prior to commit: https://reviews.llvm.org/D92257?vs=317294&id=320046#toc Reposi

[PATCH] D93844: [clang-format] Add possibility to be based on parent directory

2021-01-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 320058. HazardyKnusperkeks added a comment. Rebased and Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93844/new/ https://reviews.llvm.org/D93844 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D95128: [clang-format] [NFC] Remove unused arguments

2021-01-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. I did add the commit here, but I can give you the hash explicitly: 9aa38a0615119a7a9f3bee33a2b8915c45f1cab9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-01-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 320196. HazardyKnusperkeks added a comment. The previous one broke a (format) test in polly. This lead me to change the one breaking behavior, no it is not breaking anymore. A comment starting with `}` will only be indented if it is in a comment se

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-01-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D92257#2532071 , @curdeius wrote: > LGTM. Could you please give us a link to the failing test in Polly? May be > GitHub or buildbot. No problem: http://lab.llvm.org:8011/#builders/10/builds/2294 Repository: rG

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-01-31 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D69764#2532666 , @MyDeveloperDay wrote: >> What can be done to move this change along? > > I feel there has to be a fundamental acceptance that it is ok for > clang-format to alter code (something it already does wi

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-01-31 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D92257#2532077 , @MyDeveloperDay wrote: > I have a script that runs clang-format -n on various directories in clang > that are clang format clean, polly is one of them because they have clang > format as a unit test

[PATCH] D93844: [clang-format] Add possibility to be based on parent directory

2021-02-01 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked 3 inline comments as done. HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:160 +parent directory (or its parent if there is none). If there is no parent +file found it falls back to the ``LLVM`` style.

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-02-01 Thread Björn Schäpers 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 rG772eb24e0062: [clang-format] Add option to control the spaces in a line comment (authored by HazardyKnusperkeks). Repository: rG LLVM Github Monor

[PATCH] D93844: [clang-format] Add possibility to be based on parent directory

2021-02-01 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 320589. HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks added a comment. Fixed documentation (and rebased). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93844/new/ https://re

[PATCH] D94661: [clang-format] [PR19056] Add support for access modifiers indentation

2021-02-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. You need to supply a full diff (with context). Please also add it to the release notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94661/new/ https://reviews.llvm.org/D94661 ___ cfe-commits mailing list

[PATCH] D93844: [clang-format] Add possibility to be based on parent directory

2021-02-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked 2 inline comments as done. HazardyKnusperkeks added a comment. In D93844#2536354 , @njames93 wrote: > As a follow up it may be wise to pass a diag handler to parseConfiguration as > when we parse it a second time, we probably wan

[PATCH] D93844: [clang-format] Add possibility to be based on parent directory

2021-02-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 320886. HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks added a comment. Silence unused variable warnings in release and using `llvm::reverse` with range based for. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D109557: Adds a BreakBeforeClosingParen option

2021-09-16 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Looks good, but please wait for MyDeveloperDay’s opinion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109557/new/ https://reviews.llvm.org/D109557 ___

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-09-16 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D92257#3003281 , @byronhe wrote: > Hi guys,i found `SpacesInLineCommentPrefix` does not support other encoding > such as utf8 , > I am curious why there is a `isAlphanumeric` limit in > `BreakableLineCommentSection:

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-17 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:19271 +TEST_F(FormatTest, ConstructorInitializersWithPreprocessorDirective) { + FormatStyle Style = getLLVMStyle(); From the name I would expect also to check ```SomeCl

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D109951#3007425 , @guitard0g wrote: > When looking at test case suggestions, I happened upon another problem that > occurs when handling preprocessor directives. The following code is properly > formatted (followin

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2021-09-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Really nice! No attributes in there, do you think it would be difficult to add them? We can definitely do that in another change to move this one forward. Comment at: clang/include/clang/Format/Format.h:1863-1864 + /// \warning + /// ``Q

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109951/new/ https://reviews.llvm.org/D109951

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2021-09-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/QualifierAlignmentFixer.cpp:57 + + std::string NewText = " " + Qualifier + " "; + NewText += Next->TokenText; MyDeveloperDay wrote: > HazardyKnusperkeks wrote: > > Does not need to be addres

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2021-09-22 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/QualifierAlignmentFixer.cpp:449 +return false; + if (Tok->is(TT_TypenameMacro)) +return false; I think this is still right, because it is a type (according to the configuration). =

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2021-09-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Let's give it a first shot. When it has landed maybe I find the time to look into the attributes. ;) Comment at: clang/lib/Format/QualifierAlignmentF

[PATCH] D110359: [clang-format] ensure clang-format command-line argument sets up the default left/right qualifier ordering

2021-09-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Just fix what clang-format tells you to. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110359/new/ https://reviews.llvm.org/D110359 ___

[PATCH] D110392: [clang-format] Left/Right alignment fixer can cause false positive replacements when they don't actually change anything

2021-09-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/QualifierAlignmentFixer.cpp:95 + if (Err) +llvm::errs() << "Error removing no op replacements : " + << llvm::toString(std::move(Err)) << "\n"; The message may

[PATCH] D110432: [clang-format][docs] mark new clang-format configuration options based on which version they would GA

2021-09-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D110432#3021391 , @MyDeveloperDay wrote: > I agree this looks better > > F19213646: image.png Full support for that. And for the whole change. Comment at: cl

[PATCH] D109557: Adds a BreakBeforeClosingParen option

2021-09-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added a comment. This revision now requires changes to proceed. In D109557#3021312 , @MyDeveloperDay wrote: > FYI, this is a very aggressive change, I highly recommend you run this

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17805 + "Section{\n" + "0, bar(),\n" + "}\n" Here is no alignment, maybe add another case with anothe

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17805 + "Section{\n" + "0, bar(),\n" + "}\n" feg208 wrote: > HazardyKnusperkeks wrote: > > Here is no

[PATCH] D110432: [clang-format][docs] mark new clang-format configuration options based on which version they would GA

2021-09-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/tools/dump_format_style.py:218 + if line.startswith(r'/// \version'): +match = re.match(r'/// \\version\s*(?P[0-9.]+)*',line) +if match: This needs to be escaped, doesn't it?

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a subscriber: tstellar. HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17805 + "Section{\n" + "0, bar(),\n" + "}\n" feg208

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D109951#3015841 , @guitard0g wrote: > @MyDeveloperDay @HazardyKnusperkeks I don't have commit access, could one of > you commit this for me? Thanks so much for your review! > > Name: Josh Learn > Email: joshua_le...

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. In D110481#3027289 , @feg208 wrote: > By one other bug I mean an entirely separate bug that I will handle in a > separate PR.

<    1   2   3   4   5   6   7   8   9   10   >