kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. kbobyrev requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D89851 Files: clang-tools-extra/clangd/index/remote/Client.cpp clang-tools-extra/clangd/index/remote/Index.proto Index: clang-tools-extra/clangd/index/remote/Index.proto =================================================================== --- clang-tools-extra/clangd/index/remote/Index.proto +++ clang-tools-extra/clangd/index/remote/Index.proto @@ -24,12 +24,16 @@ message LookupRequest { repeated string ids = 1; } +message FinalResult { + bool has_more = 1; +} + // The response is a stream of symbol messages and the terminating message // indicating the end of stream. message LookupReply { oneof kind { Symbol stream_result = 1; - bool final_result = 2; + FinalResult result = 2; } } @@ -48,7 +52,7 @@ message FuzzyFindReply { oneof kind { Symbol stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } } @@ -63,7 +67,7 @@ message RefsReply { oneof kind { Ref stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } } @@ -128,7 +132,7 @@ message RelationsReply { oneof kind { Relation stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } } Index: clang-tools-extra/clangd/index/remote/Client.cpp =================================================================== --- clang-tools-extra/clangd/index/remote/Client.cpp +++ clang-tools-extra/clangd/index/remote/Client.cpp @@ -49,7 +49,7 @@ unsigned FailedToParse = 0; while (Reader->Read(&Reply)) { if (!Reply.has_stream_result()) { - FinalResult = Reply.final_result(); + FinalResult = Reply.result().has_more(); continue; } auto Response = ProtobufMarshaller->fromProtobuf(Reply.stream_result());
Index: clang-tools-extra/clangd/index/remote/Index.proto =================================================================== --- clang-tools-extra/clangd/index/remote/Index.proto +++ clang-tools-extra/clangd/index/remote/Index.proto @@ -24,12 +24,16 @@ message LookupRequest { repeated string ids = 1; } +message FinalResult { + bool has_more = 1; +} + // The response is a stream of symbol messages and the terminating message // indicating the end of stream. message LookupReply { oneof kind { Symbol stream_result = 1; - bool final_result = 2; + FinalResult result = 2; } } @@ -48,7 +52,7 @@ message FuzzyFindReply { oneof kind { Symbol stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } } @@ -63,7 +67,7 @@ message RefsReply { oneof kind { Ref stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } } @@ -128,7 +132,7 @@ message RelationsReply { oneof kind { Relation stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } } Index: clang-tools-extra/clangd/index/remote/Client.cpp =================================================================== --- clang-tools-extra/clangd/index/remote/Client.cpp +++ clang-tools-extra/clangd/index/remote/Client.cpp @@ -49,7 +49,7 @@ unsigned FailedToParse = 0; while (Reader->Read(&Reply)) { if (!Reply.has_stream_result()) { - FinalResult = Reply.final_result(); + FinalResult = Reply.result().has_more(); continue; } auto Response = ProtobufMarshaller->fromProtobuf(Reply.stream_result());
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits