This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Support python-style comments in text protos
ClosedPublic

Authored by krasimir on Nov 8 2017, 8:34 AM.

Event Timeline

krasimir created this revision.Nov 8 2017, 8:34 AM
krasimir updated this revision to Diff 122213.Nov 9 2017, 2:34 AM
  • Add more tests
krasimir added a subscriber: cfe-commits.
bkramer added a subscriber: bkramer.Nov 9 2017, 7:38 AM
bkramer added inline comments.
lib/Format/BreakableToken.cpp
48

These should stay arrays. You can use ArrayRef to get a convenient reference to them.

djasper accepted this revision.Nov 10 2017, 12:53 AM
djasper added inline comments.
lib/Format/FormatTokenLexer.cpp
345

There should be a linebreak here.

lib/Format/UnwrappedLineParser.cpp
59 ↗(On Diff #122213)

Maybe it's now better to do:

return FormatTok.is(tok::comment) && !FormatTok.TokenText.startsWith("/*");

?

This revision is now accepted and ready to land.Nov 10 2017, 12:53 AM
krasimir updated this revision to Diff 122420.Nov 10 2017, 4:46 AM
krasimir marked 3 inline comments as done.
  • [clang-format] Address review comments
This revision was automatically updated to reflect the committed changes.