diff options
| author | Alexander Kornienko <alexfh@google.com> | 2013-07-16 23:47:22 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2013-07-16 23:47:22 +0000 |
| commit | b4b4a52f1c3b768473169bc7cb450d406e1b495c (patch) | |
| tree | d13253049a25eba5686ceeb2a942eff122b3eb2a /lib/Format/Format.cpp | |
| parent | 012cff97d8b1ffebb028dcf6a0bdbfe8d127f552 (diff) | |
| download | clang-b4b4a52f1c3b768473169bc7cb450d406e1b495c.tar.gz clang-b4b4a52f1c3b768473169bc7cb450d406e1b495c.tar.bz2 clang-b4b4a52f1c3b768473169bc7cb450d406e1b495c.tar.xz | |
Avoid breaking non-trailing block comments.
Motivating example:
// column limit ------------------->
void ffffffffffff(int aaaaaa /* test */);
Formatting before the patch:
void ffffffffffff(int aaaaaa /* test
*/);
Formatting after the patch:
void
ffffffffffff(int aaaaaa /* test */);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
| -rw-r--r-- | lib/Format/Format.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 11ab58c18c..125283a0c6 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -917,7 +917,7 @@ private: Token.reset(new BreakableStringLiteral(Current, StartColumn, Line.InPPDirective, Encoding)); - } else if (Current.Type == TT_BlockComment) { + } else if (Current.Type == TT_BlockComment && Current.isTrailingComment()) { Token.reset(new BreakableBlockComment( Style, Current, StartColumn, OriginalStartColumn, !Current.Previous, Line.InPPDirective, Encoding)); |
