User Details
- User Since
- Jul 10 2012, 10:15 AM (559 w, 4 d)
Oct 27 2020
Sorry for being a bit late here and thanks @klimek for bringing this to my attention.
This has been years ago, but if I reconstruct my thinking (and look at the test cases), then I'd say that "left" alignment should not be applied to multi-variable decl statements ever.
May 12 2019
Generally, upload patches with the full file as context (that will prevent Phabricator's "Context not available")
But this change looks good. Thank you.
Apr 18 2019
Looks good. Thank you.
Feb 1 2019
Thank you.
Jan 11 2019
Ok, but this behavior is still intended. You are setting clang-format to a format where it is breaking after binary operators and then added a break before a binary operator. clang-format assumes that this is not intended and that you will want this cleaned up.
Jan 9 2019
Look at getGoogleStyle(). It has a bunch of language-specific configs at the bottom. You can do the same for TableGen in getLLVMStyle().
This seem to conceptually be a list of things rather than an array subscript, though, right? Could we alternatively set SpacesInContainerLiterals to false for LK_TableGen?
Jan 7 2019
Without understanding this in more detail I do not know how to move forward with this. What this patch is describing is what should already be the case with ColumnLimit set to zero. If it isn't this might be a bug or there might be a different way to move forward. However, the flag as is does not make sense to me without more information.
$ cat /tmp/test.cc int foo(int a, int b) { f(); }
Dec 29 2018
I don't quite understand. What you are describing should already be the behavior with ColumnLimit=0 and I think your test should pass without the new option. Doesn't it?
Nov 22 2018
Nov 21 2018
Does this also work for _asm and __asm?
Oct 30 2018
I think this roughly looks fine. Krasimir, any thoughts?
Oct 23 2018
Oct 18 2018
Ok, I think I agree with both of you to a certain extent, but I also think this change as is, is not yet right.
Aug 15 2018
Aug 1 2018
Looks good.
I don't have very strong opinions here and I agree that we will need to improve the conditional formatting, especially as this kind of ternary-chaining is becoming more popular because of constexpr.
Jul 30 2018
Ok, so IIUC, understanding that @end effective ends a section much like "}" would address the currently observed problems?
Jul 23 2018
In my opinion, this only addresses one edge case where clang-format -lines output is not identical with a full reformatting. I believe they cannot all usefully be avoided. As such, I am unsure that this option carries its weight of making the implementation more complex.
How often does this happen for you? Why can't you just format the additional incorrect line?
Could you explain what problem this is fixing?
Jul 12 2018
Jun 29 2018
Jun 26 2018
Looks good.
Jun 12 2018
You are right that this behavior is what the code authors, but also many other people, like to have and so it is what is engrained in clang-format. There are likely about a million things that fall into the same category. Now we might find that the current default is actually wrong and we have changed many defaults in the past. I don't believe that's the case here and there are more opinions on this thread.
Jun 11 2018
Looks good. Sorry for the delay.
The normal rule for formatting options apply. If you can dig up a public style guide and a project of reasonable size where it is used, we can add an option.
Jun 5 2018
May 20 2018
May 8 2018
Generally looks good.
Apr 27 2018
Looks good, thank you.
Apr 20 2018
Apr 19 2018
Looks good.
Apr 12 2018
Looks good.
I understand that, but the test example does not break after the closing paren. It breaks after the subsequent "<".
Both patch and comment inside patch say "break after closing paren" and yet that's not what the test or example in the description actually do. Why is that?
Looks good.
Looks good.
Apr 6 2018
Ok, you know the ObjC community much better than I do. If you think that adding the indentation for ObjC irrespective of the option works for most people, I am happy to go with it.
Apr 5 2018
Please read:
I'd go to great lengths to avoid adding new config options and so I don't think this would be a bad trade-off to make.
Looks good, thank you!
I still really believe that these config options do no make sense and are actively confusing.
Apr 3 2018
Apr 2 2018
Looks good. I like option 2 :).
Looks good.
Mar 30 2018
Looks good.
Mar 29 2018
Well, I disagree. It says: "If you break after the return type of a function declaration or definition, do not indent."
Do we have a public style guide that explicitly says to do this?
That's a requirement for new style options as per https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options.
Mar 27 2018
Yeah, it's one of these things where neither way would be totally intuitive to everyone.
Looks good.
Generally looks good, one minor simplification.
Mar 26 2018
Mar 23 2018
Mar 22 2018
Looks good, thank you!
Some last comments, but basically looks good.
Generally looks good.
Mar 21 2018
Looks good.
Looks good.
Please generally upload diffs with the full file as context so that Phabricator can properly expand the context where necessary.
Mar 20 2018
I'd really like to not parse include/import statements this way. Can you send me examples of headers where we fail to recognize them as ObjC and this matters (happy for you to send me examples offline).
Mar 12 2018
Ok, looks good.
Mar 8 2018
Nice.. Removed a lot of complexity :). Let's see whether this heuristic is good enough.
Mar 7 2018
Mar 6 2018
Right. So the difference is that for blocks, there is always a "(" after the "(^.....)". That should be easy to parse, no?
Mar 5 2018
Would it be enough to only add the block type case? With the macro false positive, there won't be an open paren after the closing paren, right?
Mar 2 2018
We have talked about that and none of us agree.
Got two responses so far.
Mar 1 2018
Are you sure that you are even addressing an important case? I have done some research on our codebase and this is something that happens incredibly rarely. The reason is that you have to have a very specific combination of line length, where the last parameter does not fit on one line if indented back to align with the open paren while it does fit on multiple lines if indented right of the comma. In all of LLVM/Clang, there seem to be only about 50 cases. How certain are you that people actually care?
Feb 28 2018
Ah, I thought it was somehow possible to create: