This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Handle constructor invocations after new operator in C# correct
ClosedPublic

Authored by eoanermine on Jul 16 2022, 1:39 AM.

Details

Summary
  • Handle constructor invocations after new operator in C# correct
  • Add test for the case with lambda in constructor arguments after new operator

Fixes https://github.com/llvm/llvm-project/issues/56549

Diff Detail

Event Timeline

eoanermine created this revision.Jul 16 2022, 1:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2022, 1:39 AM
eoanermine requested review of this revision.Jul 16 2022, 1:39 AM
This revision is now accepted and ready to land.Jul 16 2022, 12:46 PM
curdeius edited the summary of this revision. (Show Details)Jul 17 2022, 12:56 AM
curdeius added a reviewer: curdeius.
curdeius accepted this revision.Jul 17 2022, 1:00 AM

LGTM.

clang/lib/Format/UnwrappedLineParser.cpp
2864

Nit: comments should be full phrases, ending with full stops

owenpan accepted this revision.Jul 17 2022, 1:14 AM
MyDeveloperDay accepted this revision.Aug 7 2022, 3:19 PM

Can we land this for you?

Can we land this for you?

Yes

clang/lib/Format/UnwrappedLineParser.cpp
2869–2870

Before the patch, this code mistook lambdas in a constructor call for an initialization list.

  • Add examples to comments
  • Reformat comments right

@eoanermine, please provide your name and email address for the commit message.

@eoanermine ping... we need your name/email before we can commit.

(@curdeius, @owenpan, @HazardyKnusperkeks ) we need to have a policy for this, that if we don't get the name for a commit we are happy to land, that we'll do it the old way, and just mention them, Its frustrating for us to waste our time doing reviews only to fall at the last hurdle. (@aaron.ballman any thoughts)

@eoanermine ping... we need your name/email before we can commit.

(@curdeius, @owenpan, @HazardyKnusperkeks ) we need to have a policy for this, that if we don't get the name for a commit we are happy to land, that we'll do it the old way, and just mention them, Its frustrating for us to waste our time doing reviews only to fall at the last hurdle. (@aaron.ballman any thoughts)

Good idea on starting a policy for this. I think that policy should be discussed by the community via an RFC because we should be consistent across the project in how we handle this sort of situation, IMO (at least within the clang part of the repo; it'd be weird for the static analyzer to have a different policy from Clang which is different from clang-format). Personally, I think if there's been no response for a month, we're probably fine to commandeer the patch. That should be sufficient time for folks who have gone on vacation to have come back and responded, hopefully. I think the only situation where we might want a more tight timeframe is when the patch is critical (blocking a release kind of thing), but hopefully that situation is so rare as to not require making a policy for it.

@eoanermine, please provide your name and email address for the commit message.

We can use "Danil Sidoruk <patriotrossii2019@mail.ru>" as I did in d8d331bc9710.

This revision was landed with ongoing or failed builds.Sep 25 2022, 9:10 PM
This revision was automatically updated to reflect the committed changes.