]> granicus.if.org Git - clang/commit
[clang-format] Use NestedBlockIndent as a 0 column in formatted raw strings
authorKrasimir Georgiev <krasimir@google.com>
Thu, 8 Mar 2018 11:29:27 +0000 (11:29 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Thu, 8 Mar 2018 11:29:27 +0000 (11:29 +0000)
commit4890a84991653f96f89aaad7e8215afdba8b0441
tree3a67fab7623961571bb0e739ab7088d411631f13
parentc1fc31f7a37f79de870613c3e3d8aa5636c9522a
[clang-format] Use NestedBlockIndent as a 0 column in formatted raw strings

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");
```

Reviewers: djasper, sammccall

Reviewed By: sammccall

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D44141

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326996 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestRawStrings.cpp