[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)
commita71f626eac2bf3ffb1d45a68273a83e630957ea9
treee1f8edc8fdc09f1b9ddc95fdfae0048fbe2920a1
parent667026297da3f188ca78f4c6b0d767000b4c5d90
[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

llvm-svn: 326996
clang/lib/Format/ContinuationIndenter.cpp
clang/unittests/Format/FormatTestRawStrings.cpp