]> granicus.if.org Git - clang/commit
[clang-format] Align trailing comments if ColumnLimit is 0
authorKrasimir Georgiev <krasimir@google.com>
Wed, 23 Aug 2017 07:18:36 +0000 (07:18 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Wed, 23 Aug 2017 07:18:36 +0000 (07:18 +0000)
commit4d26b24b68c942f78286451059b3c94ecec368a3
tree7952cddb59460f15c278d533387bef9bc260c138
parentd9a1cb6ba502c424fc7813d28a49c2831b094ec2
[clang-format] Align trailing comments if ColumnLimit is 0

Summary:
ColumnLimit = 0 means no limit, so comment should always be aligned if requested. This was broken with

  https://llvm.org/svn/llvm-project/cfe/trunk@304687

introduced via

  https://reviews.llvm.org/D33830

and is included in 5.0.0-rc2. This commit fixes it and adds a unittest for this property.

Should go into clang-5.0 IMHO.

Contributed by @pboettch!

Reviewers: djasper, krasimir

Reviewed By: djasper, krasimir

Subscribers: hans, klimek

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

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