[PATCH] D59627: [clang-format] Keep protobuf "package" statement on one line

2019-03-25 Thread Donald Chai via Phabricator via cfe-commits
dchai added a comment. Just to confirm, the regression is in the number of spaces before a trailing comment? Before (2 spaces): package foo.bar; // foo.bar package After (1 space): package foo.bar; // foo.bar package Top-level options are handled the same way. I'll see if I can address

[PATCH] D59627: [clang-format] Keep protobuf "package" statement on one line

2019-03-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. This patch has caused a regression issue, see the test: verifyFormat("// Detached comment\n\n" "// Leading comment\n" "syntax = \"proto2\"; // trailing comment\n\n" "// in foo.bar package\n" "pac

[PATCH] D59627: [clang-format] Keep protobuf "package" statement on one line

2019-03-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356835: [clang-format] Keep protobuf "package" statement on one line (authored by paulhoad, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CH

[PATCH] D59627: [clang-format] Keep protobuf "package" statement on one line

2019-03-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59627/new/ https://reviews.llvm.org/D59627 __

[PATCH] D59627: [clang-format] Keep protobuf "package" statement on one line

2019-03-21 Thread Donald Chai via Phabricator via cfe-commits
dchai updated this revision to Diff 191734. dchai added a comment. Use "isOneOf" instead of two calls to "is". Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59627/new/ https://reviews.llvm.org/D59627 Files: lib/Format/TokenAnnotator.cpp unittests/Format/Form

[PATCH] D59627: [clang-format] Keep protobuf "package" statement on one line

2019-03-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1079 if (Style.Language == FormatStyle::LK_Proto && Line.Level == 0 && -CurrentToken->is(Keywords.kw_option)) { +(CurrentToken->is(Keywords.kw_option) || + CurrentToken->i

[PATCH] D59627: [clang-format] Keep protobuf "package" statement on one line

2019-03-20 Thread Donald Chai via Phabricator via cfe-commits
dchai created this revision. dchai added a reviewer: sammccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. Top-level "package" and "import" statements should generally be kept on one line, for all languages. Repository: rC Clang https://reviews.llvm.org/D59627 Fil