hanchenye-llvm-project/clang/lib/Format
Krasimir Georgiev e518e0bfe9 [clang-format] Fix regression that breaks comments without a comment prefix
Summary:
Consider formatting the following code fragment with column limit 20:
```
{
  // line 1
  // line 2\
  // long long long line
}
```
Before this fix the output is:
```
{
  // line 1
  // line 2\
  // long long
  long line
}
```
This patch fixes a regression that breaks the last comment line without
adding the '//' prefix.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 293548
2017-01-30 21:00:01 +00:00
..
AffectedRangeManager.cpp
AffectedRangeManager.h
BreakableToken.cpp [clang-format] Fix regression that breaks comments without a comment prefix 2017-01-30 21:00:01 +00:00
BreakableToken.h [clang-format] Implement comment reflowing. 2017-01-25 13:58:58 +00:00
CMakeLists.txt [clang-format] Implement comment reflowing. 2017-01-25 13:58:58 +00:00
ContinuationIndenter.cpp clang-format: [JavaScript] Undo r291974 for JavaScript. 2017-01-30 07:08:40 +00:00
ContinuationIndenter.h clang-format: Always wrap before multi-line parameters/operands. 2017-01-16 13:13:15 +00:00
Encoding.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00
Format.cpp clang-format: [JS] do not format MPEG transport streams. 2017-01-27 09:09:11 +00:00
FormatToken.cpp clang-format: Fix bug in handling of single-column lists. 2016-12-21 17:02:06 +00:00
FormatToken.h clang-format: Keep string-literal-label + value pairs on a line. 2016-12-13 11:16:42 +00:00
FormatTokenLexer.cpp clang-format: Separate out a language kind for ObjC. 2016-12-12 12:42:29 +00:00
FormatTokenLexer.h clang-format: [JS] nested and tagged template strings. 2016-08-25 10:13:21 +00:00
SortJavaScriptImports.cpp Use after move bug fixes 2016-12-23 11:40:44 +00:00
SortJavaScriptImports.h
TokenAnalyzer.cpp Don't copy replacements in for-range loop. NFC. 2016-10-19 13:50:17 +00:00
TokenAnalyzer.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00
TokenAnnotator.cpp [clang-format] Implement comment reflowing. 2017-01-25 13:58:58 +00:00
TokenAnnotator.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
UnwrappedLineFormatter.cpp [clang-format] Fixed line merging of more than two lines 2016-11-15 15:07:07 +00:00
UnwrappedLineFormatter.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
UnwrappedLineParser.cpp [clang-format] Separate line comment sections after a right brace from comment sections in the scope. 2017-01-30 19:18:55 +00:00
UnwrappedLineParser.h
WhitespaceManager.cpp [clang-format] Implement comment reflowing. 2017-01-25 13:58:58 +00:00
WhitespaceManager.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00