[PATCH] D39806: [clang-format] Support python-style comments in text protos

2017-11-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317886: [clang-format] Support python-style comments in text protos (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D39806 Files: cfe/trunk/lib/Format/BreakableToken.cpp

[PATCH] D39806: [clang-format] Support python-style comments in text protos

2017-11-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 122420. krasimir marked 3 inline comments as done. krasimir added a comment. - [clang-format] Address review comments https://reviews.llvm.org/D39806 Files: lib/Format/BreakableToken.cpp lib/Format/FormatTokenLexer.cpp lib/Format/FormatTokenLexer.h

[PATCH] D39806: [clang-format] Support python-style comments in text protos

2017-11-10 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added inline comments. This revision is now accepted and ready to land. Comment at: lib/Format/FormatTokenLexer.cpp:344 + size_t To = Lex->getBuffer().find_first_of('\n', From); + if (To == StringRef::npos) To = Lex->getBuffer().size();

[PATCH] D39806: [clang-format] Support python-style comments in text protos

2017-11-09 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: lib/Format/BreakableToken.cpp:48 + static const SmallVector KnownTextProtoPrefixes{"//", "#"}; + const SmallVectorImpl = + (Style.Language == FormatStyle::LK_TextProto) ? KnownTextProtoPrefixes