[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:773 case tok::r_brace: - // Lines can start with '}'. - if (Tok->Previous) + // Lines can start with '}' except in text protos. + if (Tok->Previous || Style.Language == FormatStyle:

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330016: [clang-format] Improve Incomplete detection for (text) protos (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D44203?vs=142394&id=142396#toc Repository:

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 142394. krasimir marked an inline comment as done. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D44203 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestProto.cpp unittests/Format/

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: lib/Format/TokenAnnotator.cpp:773 case tok::r_brace: - // Lines can start with '}'. - if (Tok->Previous) + // Lines can start with '

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:665 } + if ((Style.Language == FormatStyle::LK_Proto || + Style.Language == FormatStyle::LK_TextProto) && sammccall wrote: > I don't really understand what this is doi

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 141121. krasimir marked 2 inline comments as done. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D44203 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestProto.cpp unittests/Format/

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-03-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'm not familiar with clang-format internals, sorry if questions are dumb. My first inclination is that doing something reasonable for incomplete inputs makes sense, but it doesn't seem to be worth spending complexity on things that are actually intended to not be pro

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-03-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: sammccall. Herald added subscribers: cfe-commits, klimek. This patch improves detection of incomplete code for protos and text protos. This is especially important for text protos in raw string literals, since they might be partial strings