This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix a bug causing BeforeLambdaBody to affect brace initialiser formatting
ClosedPublic

Authored by duncan-llvm on Apr 28 2020, 9:58 AM.

Details

Summary

The condition added with the new setting checked whether the character was an l-brace, not specifically a lambda l-brace, when deciding whether it was possible to break before it or not. This caused the l-brace of some initialiser lists to break onto the next line with the first argument of the initialiser list when the setting was enabled.

Diff Detail

Event Timeline

duncan-llvm created this revision.Apr 28 2020, 9:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2020, 9:58 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
duncan-llvm added a project: Restricted Project.
This revision is now accepted and ready to land.Apr 28 2020, 10:28 AM
Wawha accepted this revision.Apr 28 2020, 10:30 AM

Thanks for the fix!

This revision was automatically updated to reflect the committed changes.