This is an archive of the discontinued LLVM Phabricator instance.

[CodeComplete] Consistently break after '{' in multi-line patterns
ClosedPublic

Authored by ilya-biryukov on May 24 2019, 9:45 AM.

Details

Summary

Completion can return multi-line patterns in some cases, e.g.

for (<#init#>; <#cond#>; <#inc#>) {
<#body#>
}

However, most patterns break the line only before closing brace,
resulting in code like:

namespace <#name#> { <#decls#>
}

While some (e.g. the 'for' example above) are breaking lines after the
opening brace too.

This change ensures all patterns consistently break after the opening
brace, this leads to nicer UX when using those in an actual editor.

Event Timeline

ilya-biryukov created this revision.May 24 2019, 9:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2019, 9:45 AM
gribozavr accepted this revision.May 28 2019, 7:17 AM
This revision is now accepted and ready to land.May 28 2019, 7:17 AM
This revision was automatically updated to reflect the committed changes.