This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Correctly recognize arrays in template parameter list.
ClosedPublic

Authored by curdeius on Mar 14 2022, 4:03 AM.

Diff Detail

Event Timeline

curdeius created this revision.Mar 14 2022, 4:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2022, 4:03 AM
curdeius requested review of this revision.Mar 14 2022, 4:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2022, 4:03 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Mar 14 2022, 5:00 AM
owenpan accepted this revision.Mar 14 2022, 10:06 AM
MyDeveloperDay accepted this revision.Mar 14 2022, 12:42 PM

It appears that this regressed some ObjC patterns:

% cat test.m  # before: good
void f() {
  //
  BOOL a = [b.c count] > 1;
  int b = a;
}
% clang-format -style=google test.m  # after: bad, statements joined on the same line
void f() {
  //
  BOOL a = [b.c count] > 1; int b = a;
}
%

@curdeius could you please take a look?

It appears that this regressed some ObjC patterns:

% cat test.m  # before: good
void f() {
  //
  BOOL a = [b.c count] > 1;
  int b = a;
}
% clang-format -style=google test.m  # after: bad, statements joined on the same line
void f() {
  //
  BOOL a = [b.c count] > 1; int b = a;
}
%

@curdeius could you please take a look?

Yes, will do.

It appears that this regressed some ObjC patterns:

@curdeius any progress on this? If not, could we revert this for now? Internally we've got enough of these regressing ObjC patterns that we can't release clang-format with this.

Yes, let's revert this. I should have a fix soon though.

Yes, let's revert this. I should have a fix soon though.

@curdeius Did you manage to find a fix suitable for both use cases?

Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 4:47 AM

Yes, let's revert this. I should have a fix soon though.

@curdeius Did you manage to find a fix suitable for both use cases?

We haven't heard from @curdeius in a very long time. I think he is (currently) not available for clang-format anymore.