This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix SplitEmptyRecord affecting SplitEmptyFunction.
ClosedPublic

Authored by curdeius on Dec 20 2021, 9:19 AM.

Details

Summary

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

Given the style:

BraceWrapping
  AfterFunction: true
 SplitEmptyFunction: true
 SplitEmptyRecord: false
...

The code that should be like:

void f(int aaaaaaaaaaaaaaaaaaaaaaaaaaaa,
       int bbbbbbbbbbbbbbbbbbbbbbbb)
{
}

gets the braces merged together:

void f(int aaaaaaaaaaaaaaaaaaaaaaaaaaaa,
       int bbbbbbbbbbbbbbbbbbbbbbbb)
{}

Diff Detail

Event Timeline

curdeius requested review of this revision.Dec 20 2021, 9:19 AM
curdeius created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2021, 9:19 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MyDeveloperDay accepted this revision.Dec 21 2021, 5:45 AM

LGTM, less the clang-format oddities

This revision is now accepted and ready to land.Dec 21 2021, 5:45 AM
This revision was landed with ongoing or failed builds.Dec 21 2021, 7:54 AM
This revision was automatically updated to reflect the committed changes.