]> granicus.if.org Git - clang/commit
[clang-format] Re-align broken comment lines where appropriate.
authorKrasimir Georgiev <krasimir@google.com>
Fri, 3 Feb 2017 10:18:25 +0000 (10:18 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Fri, 3 Feb 2017 10:18:25 +0000 (10:18 +0000)
commit0b6e3eba6801a3995dd16fc50952fbff3537537e
treef4977c93651e6630dad93db5de8aedb5dc730f12
parentdfc274d9ec49ca323a5d789b9475fd653351b90c
[clang-format] Re-align broken comment lines where appropriate.

Summary:
The comment aligner was skipping over newly broken comment lines. This patch fixes that.

source:
```
int ab; // line
int a; // long long
```

format with column limit 15 before:
```
int ab; // line
int a;  // long
       // long
```

format with column limit 15 after:
```
int ab; // line
int a;  // long
        // long
```

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

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

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