Page MenuHomePhabricator
Feed Advanced Search

Fri, Jun 26

krasimir added inline comments to D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign.
Fri, Jun 26, 2:40 AM · Restricted Project

Wed, Jun 24

krasimir committed rG0fad648b65b9: [clang-format] restore indent in conditionals when AlignOperands is DontAlign (authored by krasimir).
[clang-format] restore indent in conditionals when AlignOperands is DontAlign
Wed, Jun 24, 4:17 AM
krasimir closed D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign.
Wed, Jun 24, 4:17 AM · Restricted Project
krasimir updated the diff for D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign.
  • try to update Phabricator diff
Wed, Jun 24, 4:17 AM · Restricted Project
krasimir updated the diff for D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign.
  • refresh Phabricator diff
Wed, Jun 24, 4:16 AM · Restricted Project
krasimir updated the diff for D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign.
  • add a FIXME
Wed, Jun 24, 3:44 AM · Restricted Project

Fri, Jun 19

krasimir retitled D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign from [clang-format] restore indent in conditionals AlignOperands is DontAlign to [clang-format] restore indent in conditionals when AlignOperands is DontAlign.
Fri, Jun 19, 9:12 AM · Restricted Project
krasimir added a reviewer for D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign: sammccall.
Fri, Jun 19, 9:12 AM · Restricted Project
krasimir updated the summary of D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign.
Fri, Jun 19, 8:37 AM · Restricted Project
krasimir abandoned D82181: [clang-format] indent in chained conditionals when AlignOperands:DontAlign.
Fri, Jun 19, 8:37 AM · Restricted Project
krasimir created D82199: [clang-format] restore indent in conditionals when AlignOperands is DontAlign.
Fri, Jun 19, 8:37 AM · Restricted Project
krasimir updated the diff for D82181: [clang-format] indent in chained conditionals when AlignOperands:DontAlign.
  • add a regression test
Fri, Jun 19, 8:37 AM · Restricted Project
krasimir created D82181: [clang-format] indent in chained conditionals when AlignOperands:DontAlign.
Fri, Jun 19, 6:59 AM · Restricted Project

Tue, Jun 9

krasimir accepted D81467: [clang-format] Microsoft style fixes for C# properties.

Thank you!

Tue, Jun 9, 6:33 AM · Restricted Project, Restricted Project

Mon, Jun 8

krasimir accepted D81394: [clang-format] Brace breaking for C# lambdas.

Thank you!

Mon, Jun 8, 1:18 PM · Restricted Project, Restricted Project

Fri, Jun 5

krasimir accepted D81255: [clang-format] treat 'lock' as a keyword for C# code.
Fri, Jun 5, 5:27 AM · Restricted Project, Restricted Project

Thu, Jun 4

krasimir accepted D79715: [clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide.
Thu, Jun 4, 8:11 AM · Restricted Project, Restricted Project
krasimir added a comment to D80950: [clang-format] [PR44542,38872] String << String always get a forced newline..

Another weak argument about why the current rule makes sense (break before << between two string literals) is: suppose you don't want such a break. Then you can change your code to concatenate the two string literals into a single one, avoiding the problem altogether, if possible (this can be unacceptable in cases where the combined length of the two string literals is excessive, but at that point we will likely break because of the column limit; or when there is a chain of more than 2 string literals and the user wishes to keep them fluently reflowing as the code evolves.)

Thu, Jun 4, 2:40 AM · Restricted Project, Restricted Project

May 28 2020

krasimir added a comment to D50078: clang-format: support aligned nested conditionals formatting.

I'm happy with this patch!

We found a couple of rough edges:

  • alignment after ?: and
  • new formatting of _ ? _ ? _ : _ : _ patterns is bad

    These are illustrated as examples D and E below (A, B and C look good to me). test.cc is how I'd expect clang-format to behave with this patch with BreakBeforeTernaryOperators = true, like in LLVM style.
  • alignment after ?:: this is a GNU extension and we've seen it used in C++ and ObjC: https://stackoverflow.com/questions/24538096/in-objective-c. I think this is special enough for us to consider an occurrence of ?: to break a ternary operator chain for the purposes of this alignment. I'd expect a +4 alignment of the last 2 lines of example D for consistency with A.
  • new formatting doesn't work for _ ? _ ? _ : _ : _ patterns; old formatting is better in that case. I think the new chained alignment works very well for _ ? _ : _ ? _ : _ ... cases, but we should attempt it otherwise.
% cat test.cc
//-- column 80 ----------------------------------------------------------------V
// A
int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
            ? bbbbbbbbbbbbbbbbbbb
            : cccccccccccccccccccc;
 
//-- column 80 ----------------------------------------------------------------V
// B
int i = aaaaaaaaaaaaaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbbb
        : cccccccccccccccccccc     ? dddddddddddddddddddd
                                   : eeeeeeeeeeeeeeeee;
 
//-- column 80 ----------------------------------------------------------------V
// C
int i = aaaaaaaaaaaaaaaaaaaaaaaaaa
            ?: bbbbbbbbbbbbbbbbbbb ? ccccccccccccc
                                   : ddddddddd;
 
//-- column 80 ----------------------------------------------------------------V
// D
int i = aaaaaaaaaaaaaaaaaaaaaaaaaa
            ?: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                   ? bbbbbbbbbbbbbbbbbbb
                   : cccccccccccccccccccc;
 
//-- column 80 ----------------------------------------------------------------V
// E 
return temp[0] > temp[1] ? temp[0] > temp[2] ? 0 : 2
                         : temp[1] > temp[2] ? 1 : 2;
% bin/clang-format -style=llvm test.cc
//-- column 80 ----------------------------------------------------------------V
// A
int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
            ? bbbbbbbbbbbbbbbbbbb
            : cccccccccccccccccccc;
 
//-- column 80 ----------------------------------------------------------------V
// B
int i = aaaaaaaaaaaaaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbbb
        : cccccccccccccccccccc     ? dddddddddddddddddddd
                                   : eeeeeeeeeeeeeeeee;
 
//-- column 80 ----------------------------------------------------------------V
// C
int i = aaaaaaaaaaaaaaaaaaaaaaaaaa
            ?: bbbbbbbbbbbbbbbbbbb ? ccccccccccccc
                                   : ddddddddd;
 
//-- column 80 ----------------------------------------------------------------V
// D
int i = aaaaaaaaaaaaaaaaaaaaaaaaaa
            ?: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
               ? bbbbbbbbbbbbbbbbbbb
               : cccccccccccccccccccc;
 
//-- column 80 ----------------------------------------------------------------V
// E
return temp[0] > temp[1]   ? temp[0] > temp[2] ? 0 : 2
       : temp[1] > temp[2] ? 1
                           : 2;
May 28 2020, 4:51 AM · Restricted Project, Restricted Project

May 26 2020

krasimir accepted D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses.

This is nice! Thank you!

May 26 2020, 10:17 AM · Restricted Project, Restricted Project
krasimir added inline comments to D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses.
May 26 2020, 9:11 AM · Restricted Project, Restricted Project
krasimir added inline comments to D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses.
May 26 2020, 6:27 AM · Restricted Project, Restricted Project
krasimir added a comment to D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format.
May 26 2020, 6:27 AM · Restricted Project, Restricted Project
krasimir added a comment to D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format.

maybe for now we just do

if (FormatTok->is(tok::l_square) && !Style.isObjC())
    parseSquare();
May 26 2020, 3:11 AM · Restricted Project, Restricted Project

May 25 2020

krasimir added a comment to D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format.

Unfortunately this introduced a bad regression with ObjC method expressions in if bodies:

if (argc > 5) [obj func:arg];

is now formatted as:

if (argc > 5)[obj func:arg]
  ;
May 25 2020, 9:05 AM · Restricted Project, Restricted Project
krasimir added a comment to D50078: clang-format: support aligned nested conditionals formatting.

I'm happy with this patch!

May 25 2020, 6:56 AM · Restricted Project, Restricted Project

May 22 2020

krasimir added a comment to D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions.

Just some thoughts.

May 22 2020, 6:23 AM · Restricted Project, Restricted Project

May 18 2020

krasimir accepted D79325: [clang-format] [PR42164] Add Option to Break before While.

Thank you!

May 18 2020, 1:34 AM · Restricted Project, Restricted Project

May 15 2020

krasimir added inline comments to D79990: [clang-format] [PR45614] Incorrectly indents [[nodiscard]] attribute funtions after a macro without semicolon.
May 15 2020, 6:28 AM · Restricted Project, Restricted Project
krasimir requested changes to D79325: [clang-format] [PR42164] Add Option to Break before While.
May 15 2020, 4:29 AM · Restricted Project, Restricted Project

May 14 2020

krasimir accepted D79935: [clang-format] [PR44345] Long namespace closing comment is duplicated endlessly.

Awesome! Thank you!

May 14 2020, 1:36 PM · Restricted Project, Restricted Project

May 12 2020

krasimir added a comment to D79715: [clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide.

I expect that accepting this patch will need require an update to be made to https://github.com/google/styleguide.

May 12 2020, 2:32 PM · Restricted Project, Restricted Project
krasimir added a reviewer for D79715: [clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide: sammccall.
May 12 2020, 2:32 PM · Restricted Project, Restricted Project
krasimir added inline comments to D79325: [clang-format] [PR42164] Add Option to Break before While.
May 12 2020, 1:59 PM · Restricted Project, Restricted Project

May 8 2020

krasimir added a comment to rGc5e0967e4cf0: Revert "[DebugInfo] Fix handling DW_OP_call_ref in DWARF64 units.".

Note: https://github.com/llvm/llvm-project/commit/6ab09e717745d5262fc0cf33f9190992c7f7dd67 fixed non-sanitizer build bots: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/28298.

May 8 2020, 9:37 AM
krasimir committed rGc5e0967e4cf0: Revert "[DebugInfo] Fix handling DW_OP_call_ref in DWARF64 units." (authored by krasimir).
Revert "[DebugInfo] Fix handling DW_OP_call_ref in DWARF64 units."
May 8 2020, 8:33 AM
krasimir added a reverting change for rG989ae9e848a0: [DebugInfo] Fix handling DW_OP_call_ref in DWARF64 units.: rGc5e0967e4cf0: Revert "[DebugInfo] Fix handling DW_OP_call_ref in DWARF64 units.".
May 8 2020, 8:33 AM
krasimir added a comment to D79093: [DebugInfo] Fix printing values of forms which depend on the DWARF format..

Reverted a git revision as a follow-up of this in https://github.com/llvm/llvm-project/commit/c5e0967e4cf0f1337bec772949e6cede4c01354b because of:

May 8 2020, 8:33 AM · debug-info, Restricted Project

May 7 2020

krasimir accepted D79354: [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration.
May 7 2020, 3:14 PM · Restricted Project, Restricted Project
krasimir accepted D79354: [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration.

Thank you! Looks good with a couple of nits.

May 7 2020, 1:02 PM · Restricted Project, Restricted Project
krasimir accepted D79401: [clang-format] [PR45639] clang-format splits up the brackets of C++17 attribute [[ ]] when used with the first parameter.

Thank you!

May 7 2020, 1:02 PM · Restricted Project, Restricted Project
krasimir accepted D79326: [clang-format] ensure dump_format_style.py works with Python3 correctly.
May 7 2020, 7:54 AM · Restricted Project, Restricted Project

May 6 2020

krasimir added a comment to D79401: [clang-format] [PR45639] clang-format splits up the brackets of C++17 attribute [[ ]] when used with the first parameter.

I think we should never break apart the two [[ and ]] of attributes.
Running that example with -debug shows that we consider breaking between the two [ tokens a valid possibility.

  • C=1 means breaking before the token is OK, which is probably computed by TokenAnnotator::canBreakBefore:
% bin/clang-format -debug ~/test.cc
Line(0, FSC=0): void[T=85, OC=0] identifier[T=85, OC=5] coloncolon[T=85, OC=22] identifier[T=85, OC=24] l_paren[T=85, OC=50] l_square[T=85, OC=51] l_square[T=85, OC=52] identifier[T=85, OC=53] r_square[T=85, OC=65] r_square[T=85, OC=66] const[T=85, OC=68] identifier[T=85, OC=74] less[T=85, OC=84] identifier[T=85, OC=85] greater[T=85, OC=98] amp[T=85, OC=99] identifier[T=85, OC=101] identifier[T=85, OC=51] r_paren[T=85, OC=59] l_brace[T=21, OC=61] 
Line(0, FSC=0): r_brace[T=85, OC=0] 
Line(0, FSC=0): eof[T=85, OC=0] 
Run 0...
AnnotatedTokens(L=0):
 M=0 C=0 T=Unknown S=1 B=0 BK=0 P=0 Name=void L=4 PPK=2 FakeLParens= FakeRParens=0 II=0x219c910 Text='void'
 M=0 C=1 T=FunctionDeclarationName S=1 B=0 BK=0 P=80 Name=identifier L=22 PPK=2 FakeLParens= FakeRParens=0 II=0x21d8210 Text='SomeLongClassName'
 M=0 C=0 T=Unknown S=0 B=0 BK=0 P=23 Name=coloncolon L=24 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='::'
 M=0 C=1 T=Unknown S=0 B=0 BK=0 P=520 Name=identifier L=50 PPK=2 FakeLParens= FakeRParens=0 II=0x21d8258 Text='ALongMethodNameInThatClass'
 M=0 C=0 T=Unknown S=0 B=0 BK=0 P=23 Name=l_paren L=51 PPK=1 FakeLParens= FakeRParens=0 II=0x0 Text='('
 M=0 C=1 T=AttributeSquare S=0 B=0 BK=0 P=140 Name=l_square L=52 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='['
 M=0 C=1 T=AttributeSquare S=0 B=0 BK=0 P=79 Name=l_square L=53 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='['
 M=0 C=0 T=Unknown S=0 B=0 BK=0 P=99 Name=identifier L=65 PPK=2 FakeLParens= FakeRParens=0 II=0x21d8290 Text='maybe_unused'
 M=0 C=0 T=AttributeSquare S=0 B=0 BK=0 P=83 Name=r_square L=66 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=']'
 M=0 C=0 T=AttributeSquare S=0 B=0 BK=0 P=63 Name=r_square L=67 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=']'
 M=0 C=0 T=Unknown S=1 B=0 BK=0 P=43 Name=const L=73 PPK=2 FakeLParens= FakeRParens=0 II=0x219c3e8 Text='const'
 M=0 C=0 T=Unknown S=1 B=0 BK=0 P=43 Name=identifier L=84 PPK=2 FakeLParens= FakeRParens=0 II=0x21d82c8 Text='shared_ptr'
 M=0 C=0 T=TemplateOpener S=0 B=0 BK=0 P=50 Name=less L=85 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='<'
 M=0 C=1 T=Unknown S=0 B=0 BK=0 P=380 Name=identifier L=98 PPK=2 FakeLParens= FakeRParens=0 II=0x21d8300 Text='ALongTypeName'
 M=0 C=0 T=TemplateCloser S=0 B=0 BK=0 P=290 Name=greater L=99 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='>'
 M=0 C=1 T=PointerOrReference S=1 B=0 BK=0 P=230 Name=amp L=101 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='&'
 M=0 C=1 T=StartOfName S=0 B=0 BK=0 P=240 Name=identifier L=120 PPK=2 FakeLParens= FakeRParens=0 II=0x21d8340 Text='argumentNameForThat'
 M=0 C=1 T=StartOfName S=1 B=0 BK=0 P=150 Name=identifier L=129 PPK=2 FakeLParens= FakeRParens=0 II=0x21d8378 Text='LongType'
 M=0 C=0 T=Unknown S=0 B=0 BK=0 P=43 Name=r_paren L=130 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=')'
 M=0 C=0 T=FunctionLBrace S=1 B=0 BK=1 P=23 Name=l_brace L=132 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='{'
----
May 6 2020, 12:25 PM · Restricted Project, Restricted Project
krasimir added inline comments to D79325: [clang-format] [PR42164] Add Option to Break before While.
May 6 2020, 11:52 AM · Restricted Project, Restricted Project
krasimir added inline comments to D79354: [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration.
May 6 2020, 11:52 AM · Restricted Project, Restricted Project
krasimir added a comment to D79293: [clang-format] [PR45218] Fix an issue where < and > and >> in a for loop gets incorrectly interpreted at a TemplateOpener/Closer.

I think these examples are too ambiguous for clang-format to try and format correctly.
Sadly for C++, correctly distinguishing between >>, the binary operator, and >>, the sequence of two closing template brackets, requires semantic analysis, I believe.
Such heuristics are very brittle, e.g. this patch fixes if (i < x >> 1) but regresses this:

% cat ~/test.cc
bool f() {
  if (w<u<v<x>>, 1>::t) return true;
}
% bin/clang-format ~/test.cc 
bool f() {
  if (w < u < v < x >>, 1 > ::t)
    return true;
}
%

We can of course enumerate a fixed set of patterns where we apply such fixes fixes, but I'm not sure how much is that worth.
I think clang-format's current approach to choose to interpret as a template, even if silly at times, is reasonable.
A way to deal with if (i < x >> 1) is to give clang-format a hint e.g. if (i < (x >> 1)). You can ~always surround an expression with braces, but if clang-format guesses incorrectly two template closers as a binary operator, I can't think of a good way to force it to stop.

May 6 2020, 11:19 AM · Restricted Project, Restricted Project
krasimir accepted D79000: [clang-format] C# property formatting can be controlled by config options.

I think this is OK as-is.

May 6 2020, 10:46 AM · Restricted Project, Restricted Project

May 5 2020

krasimir added a comment to D79354: [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration.

I'm not familiar with ObjC, but hope this helps:

% cat ~/example.mm   # left as-is by clang-format without D79354                 
(int)f : (int)arg {
  struct A as[] = {{a11, a12},  //
                   {a21, a22},  //
                   {nil, 0}};
  return 0;
}
% bin/clang-format ~/example.mm  # clang-format with D79354
(int)f : (int)arg {
  struct A as[] = {
    {a11, a12},     //
        {a21, a22}, //
    {
      nil, 0
    }
  };
  return 0;
}
%
May 5 2020, 12:58 PM · Restricted Project, Restricted Project
krasimir added inline comments to D79354: [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration.
May 5 2020, 10:14 AM · Restricted Project, Restricted Project
krasimir added a comment to D79354: [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration.

I have an example where this goes wrong in ObjC (modulo indentation):

May 5 2020, 10:14 AM · Restricted Project, Restricted Project

Apr 30 2020

krasimir accepted D79172: [clang-format] [PR45626] SpacesInAngles does not insert or preserve leading space before :: operator.

Thank you!

Apr 30 2020, 7:56 AM · Restricted Project, Restricted Project
krasimir added a comment to D79095: [clang-format] NFC Correct clang-format headers file so documentation can be once again autogenerated.

Awesome! Thank you!
Now that we've got "clang/phabricator/lint/git" robots that leave comments on patches, we may want to think about a way to have this automatically enforced in the future.

Thats a great idea.. do you know who looks after those scripts?

Apr 30 2020, 1:48 AM · Restricted Project, Restricted Project

Apr 29 2020

krasimir added a comment to D79095: [clang-format] NFC Correct clang-format headers file so documentation can be once again autogenerated.

Awesome! Thank you!
Now that we've got "clang/phabricator/lint/git" robots that leave comments on patches, we may want to think about a way to have this automatically enforced in the future.

Apr 29 2020, 9:06 AM · Restricted Project, Restricted Project
krasimir accepted D79095: [clang-format] NFC Correct clang-format headers file so documentation can be once again autogenerated.
Apr 29 2020, 9:06 AM · Restricted Project, Restricted Project

Apr 28 2020

krasimir added a comment to D79000: [clang-format] C# property formatting can be controlled by config options.

I'm curious why we don't go the opposite direction -- why are even those two styles needed separately?

public int Style1 { get; set }
// vs.
public int Style2
{ get; set }

I'm sure there is a good reason; part of this is to make sure we document it so we may consistently do more updates and support more complicated cases in the same spirit.
IMO starting with some reasonable formatting, and later supporting different styles as needed, has been practical to keep clang-format from becoming harder to maintain.

Apr 28 2020, 9:06 AM · Restricted Project, Restricted Project
krasimir accepted D78915: [clang-format] Improved parser for C# properties.

Thank you!

Apr 28 2020, 5:51 AM · Restricted Project, Restricted Project
krasimir added a comment to D78694: [clang-format] Fix lambda with ellipsis in return type.

Thank you!

Apr 28 2020, 4:15 AM · Restricted Project, Restricted Project
krasimir accepted D78694: [clang-format] Fix lambda with ellipsis in return type.
Apr 28 2020, 4:15 AM · Restricted Project, Restricted Project

Apr 27 2020

krasimir added inline comments to D78915: [clang-format] Improved parser for C# properties.
Apr 27 2020, 11:17 AM · Restricted Project, Restricted Project

Apr 23 2020

krasimir added a comment to D78694: [clang-format] Fix lambda with ellipsis in return type.

Could you please update the patch with full context: https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface
This helps out when reviewing.

Apr 23 2020, 3:45 AM · Restricted Project, Restricted Project
krasimir accepted D78642: [clang-format] Handle C# property accessors when parsing lines.

Thank you!

Apr 23 2020, 3:13 AM · Restricted Project, Restricted Project

Apr 16 2020

krasimir accepted D78295: [clang-format] Do not interpret C# deconstruction in a foreach as a cast.

Nice!

Apr 16 2020, 6:10 AM · Restricted Project, Restricted Project

Apr 6 2020

krasimir accepted D77548: clang-format: [JS] handle pseudo-keywords..

Looks good! The linter suggests a few formatting fixes.

Apr 6 2020, 8:05 AM · Restricted Project
krasimir added a comment to D75364: [clang-format] Handle macros in function params and return value.

A sample of snippets that this misformats:

Apr 6 2020, 5:22 AM · Restricted Project, Restricted Project
krasimir added a comment to D75364: [clang-format] Handle macros in function params and return value.

I think situations where we infer M(x) to expand to a "type" without const/volatile close-by are too ambiguous an we will have the opposite problem: formatting certain binary expressions as type pointer/references. Some sort of a list of macros that clang-format assumes expand to a "type" could eliminate ambiguities, but has its own problems.
I think the case where there's a const/volatile/typename/typedef etc. around M(x) is very interesting; not sure if there are many practical ambiguities there.
There was an idea of giving a bunch of #define-s to clang-format (maybe with a small subset of what's possible) and use these rules to decide how to format matching forms, but that's hard (requires some sort of "virtual expanded token sequences" that the formatter should undestrand how to handle) to do and I don't know what's the status of that.

Apr 6 2020, 3:45 AM · Restricted Project, Restricted Project
krasimir added a reviewer for D75364: [clang-format] Handle macros in function params and return value: klimek.
Apr 6 2020, 3:13 AM · Restricted Project, Restricted Project

Apr 3 2020

krasimir added inline comments to D77311: clang-format: [JS] detect C++ keywords..
Apr 3 2020, 4:48 AM · Restricted Project, Restricted Project
krasimir accepted D77311: clang-format: [JS] detect C++ keywords..

Thank you!

Apr 3 2020, 4:15 AM · Restricted Project, Restricted Project
krasimir requested changes to D77311: clang-format: [JS] detect C++ keywords..
Apr 3 2020, 3:11 AM · Restricted Project, Restricted Project

Apr 2 2020

krasimir added a comment to D77311: clang-format: [JS] detect C++ keywords..
In D77311#1957367, @jfb wrote:

Some of these are technically "future reserved keywords": https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords

Wouldn't it be better to list all of JS's keywords at this point?

Apr 2 2020, 10:17 AM · Restricted Project, Restricted Project

Mar 31 2020

krasimir accepted D77064: [clang-format] Correct line breaks in C# generic type constraints.

Awesome!

Mar 31 2020, 10:52 AM · Restricted Project, Restricted Project

Mar 30 2020

krasimir committed rG0574030c0161: [clang-format] only parse C# generic type constraints in C# (authored by krasimir).
[clang-format] only parse C# generic type constraints in C#
Mar 30 2020, 4:50 AM

Mar 26 2020

krasimir accepted D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107).

I think this is an improvement. Accepting with a nit. Thank you!

Mar 26 2020, 8:38 AM · Restricted Project
krasimir added a comment to D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107).

@MyDeveloperDay : sorry, I must have not refreshed this page and didn't realize you already gave an LGTM until I posted the comment.

Mar 26 2020, 8:38 AM · Restricted Project

Mar 23 2020

krasimir accepted D76621: [clang-format] No space inserted between commas in C#.
Mar 23 2020, 9:14 AM · Restricted Project, Restricted Project
krasimir accepted D75760: [clang-format] Do not indent C# array initialisers as continuations.

This is OK with the comment in the code. Thank you!

Mar 23 2020, 7:36 AM · Restricted Project, Restricted Project
krasimir accepted D76597: [clang-format] Reflow long C# generic type constraints correctly.

Awesome! Thank you!

Mar 23 2020, 5:58 AM · Restricted Project, Restricted Project

Mar 19 2020

krasimir accepted D76367: [clang-format] Handle C# generic type constraints.

Thank you!

Mar 19 2020, 5:54 AM · Restricted Project, Restricted Project
krasimir requested changes to D76367: [clang-format] Handle C# generic type constraints.
Mar 19 2020, 3:11 AM · Restricted Project, Restricted Project

Mar 11 2020

krasimir accepted D75983: [clang-format] Improved identification of C# nullables.

Thank you!

Mar 11 2020, 6:18 AM · Restricted Project, Restricted Project
krasimir accepted D75984: [clang-format] No space in `new()` and `this[Type x]` in C#.

Thank you!

Mar 11 2020, 6:17 AM · Restricted Project, Restricted Project
krasimir added inline comments to D75983: [clang-format] Improved identification of C# nullables.
Mar 11 2020, 5:44 AM · Restricted Project, Restricted Project

Mar 9 2020

krasimir accepted D75747: [clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers.

Thank you!

Mar 9 2020, 11:19 AM · Restricted Project, Restricted Project
krasimir accepted D75856: [clang-format] cleanup from D75517.
Mar 9 2020, 10:46 AM · Restricted Project, Restricted Project
krasimir requested changes to D75760: [clang-format] Do not indent C# array initialisers as continuations.
Mar 9 2020, 10:46 AM · Restricted Project, Restricted Project
krasimir accepted D75731: [clang-format] C# does not indent braced initializers as continuations.

Thank you

Mar 9 2020, 10:46 AM · Restricted Project, Restricted Project
krasimir accepted D75856: [clang-format] cleanup from D75517.

Thank you!

Mar 9 2020, 10:13 AM · Restricted Project, Restricted Project
krasimir requested changes to D75856: [clang-format] cleanup from D75517.

The new pre-merge checks are cool! Please clang-format the updated lines accordingly.

Mar 9 2020, 10:13 AM · Restricted Project, Restricted Project
krasimir requested changes to D75747: [clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers.

Looks good! I'll stamp this after https://reviews.llvm.org/D75731 gets merged and this rebased on top of it.

Mar 9 2020, 10:13 AM · Restricted Project, Restricted Project
krasimir added inline comments to D75731: [clang-format] C# does not indent braced initializers as continuations.
Mar 9 2020, 10:13 AM · Restricted Project, Restricted Project
krasimir requested changes to D75731: [clang-format] C# does not indent braced initializers as continuations.
Mar 9 2020, 10:13 AM · Restricted Project, Restricted Project

Mar 6 2020

krasimir added a comment to D75517: [clang-format] Do not format C# array subscript operators as attributes.

sorry could you please take another look at the comments I left

Mar 6 2020, 2:22 PM · Restricted Project, Restricted Project

Mar 5 2020

krasimir committed rG29693fc12559: Revert "[BFI] Use CallbackVH to notify BFI about deletion of basic blocks" (authored by krasimir).
Revert "[BFI] Use CallbackVH to notify BFI about deletion of basic blocks"
Mar 5 2020, 6:02 AM
krasimir added a reverting change for rG8975aa6ea817: [BFI] Use CallbackVH to notify BFI about deletion of basic blocks: rG29693fc12559: Revert "[BFI] Use CallbackVH to notify BFI about deletion of basic blocks".
Mar 5 2020, 6:02 AM
krasimir committed rG36c2ab8d04cd: [clang-format] do not insert spaces around inline asm symbolic names (authored by krasimir).
[clang-format] do not insert spaces around inline asm symbolic names
Mar 5 2020, 5:30 AM
krasimir closed D75675: [clang-format] do not insert spaces around inline asm symbolic names.
Mar 5 2020, 5:30 AM · Restricted Project, Restricted Project
krasimir updated the diff for D75675: [clang-format] do not insert spaces around inline asm symbolic names.

Merging commits into 1 patch

Mar 5 2020, 5:29 AM · Restricted Project, Restricted Project
krasimir updated the diff for D75675: [clang-format] do not insert spaces around inline asm symbolic names.

Remove redundant check.

Mar 5 2020, 5:29 AM · Restricted Project, Restricted Project
krasimir added inline comments to D75675: [clang-format] do not insert spaces around inline asm symbolic names.
Mar 5 2020, 5:29 AM · Restricted Project, Restricted Project
krasimir updated the summary of D75675: [clang-format] do not insert spaces around inline asm symbolic names.
Mar 5 2020, 4:56 AM · Restricted Project, Restricted Project