diff options
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 6 | ||||
-rw-r--r-- | clang/unittests/Format/FormatTestProto.cpp | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index a3000a8fdeb..ccf5e51576d 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1119,10 +1119,10 @@ public: return LT_ImportStatement; } - // In .proto files, top-level options and package statements are very - // similar to import statements and should not be line-wrapped. + // In .proto files, top-level options are very similar to import statements + // and should not be line-wrapped. if (Style.Language == FormatStyle::LK_Proto && Line.Level == 0 && - CurrentToken->isOneOf(Keywords.kw_option, Keywords.kw_package)) { + CurrentToken->is(Keywords.kw_option)) { next(); if (CurrentToken && CurrentToken->is(tok::identifier)) return LT_ImportStatement; diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp index fd4870c27f2..d5683b5b844 100644 --- a/clang/unittests/Format/FormatTestProto.cpp +++ b/clang/unittests/Format/FormatTestProto.cpp @@ -393,12 +393,6 @@ TEST_F(FormatTestProto, FormatsOptions) { "};"); } -TEST_F(FormatTestProto, DoesntWrapPackageStatements) { - verifyFormat( - "package" - " some.really.long.package.that.exceeds.the.column.limit00000000;"); -} - TEST_F(FormatTestProto, FormatsService) { verifyFormat("service SearchService {\n" " rpc Search(SearchRequest) returns (SearchResponse) {\n" |