[clang-format] skip empty lines and comments in the top of the code when inserting new headers.
Pair-programmed with @hokein
Paths
| Differential D20898
[clang-format] skip empty lines and comments in the top of the code when inserting new headers. ClosedPublic Authored by ioeric on Jun 2 2016, 12:46 AM.
Details Summary [clang-format] skip empty lines and comments in the top of the code when inserting new headers. Pair-programmed with @hokein
Diff Detail Event TimelineComment Actions Could we very easily use the FormatTokenLexer for this? I.e. find the first non-comment token an start from there?
ioeric marked an inline comment as done. Comment Actions
This revision is now accepted and ready to land.Jun 3 2016, 4:53 AM Closed by commit rL271664: [clang-format] skip empty lines and comments in the top of the code when… (authored by ioeric). · Explain WhyJun 3 2016, 5:59 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 59511 lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
|
Thinking about this some more, I think the FormatTokenLexer already does too much. Maybe just use a regular lexer?