]> granicus.if.org Git - clang/commit
[clang-format] Fix regression about adding leading whitespace to the content of line...
authorKrasimir Georgiev <krasimir@google.com>
Tue, 31 Jan 2017 15:40:15 +0000 (15:40 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Tue, 31 Jan 2017 15:40:15 +0000 (15:40 +0000)
commit1f795aa6ca9e2d715cc73814410e4ef3fc02f9bf
tree869474a0bc36d2c5d98e1197e0126c32748010c0
parentcb885d1c534b210e5c4d6e17a4d788b648514197
[clang-format] Fix regression about adding leading whitespace to the content of line comments

Summary:
The reflower didn't measure precisely the line column of a line in the middle of
a line comment section that has a prefix that needs to be adapted.

source:
```
/// a
//b
```

format before:
```
/// a
 //b
```

format after:
```
/// a
// b
```

Reviewers: djasper

Reviewed By: djasper

Subscribers: sammccall, cfe-commits, klimek

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

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