Page MenuHomePhabricator

[clang-format] Use NestedBlockIndent as a 0 column in formatted raw strings
ClosedPublic

Authored by krasimir on Mar 6 2018, 3:35 AM.

Details

Summary

This makes the formatter of raw string literals use NestedBlockIndent for
determining the 0 column of the content inside. This makes the formatting use
less horizonal space and fixes a case where two newlines before and after the
raw string prefix were selected instead of a single newline after it:

Before:

aaaa = ffff(
    R"pb(
      key: value)pb");

After:

aaaa = ffff(R"pb(
    key: value)pb");

Diff Detail

Repository
rL LLVM

Event Timeline

krasimir created this revision.Mar 6 2018, 3:35 AM
sammccall accepted this revision.Mar 6 2018, 6:24 AM

LGTM, probably want to wait for djasper's opinion.

This revision is now accepted and ready to land.Mar 6 2018, 6:24 AM
This revision was automatically updated to reflect the committed changes.