diff --git a/clang-tools-extra/clangd/index/remote/Client.cpp b/clang-tools-extra/clangd/index/remote/Client.cpp --- a/clang-tools-extra/clangd/index/remote/Client.cpp +++ b/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()); diff --git a/clang-tools-extra/clangd/index/remote/Index.proto b/clang-tools-extra/clangd/index/remote/Index.proto --- a/clang-tools-extra/clangd/index/remote/Index.proto +++ b/clang-tools-extra/clangd/index/remote/Index.proto @@ -24,12 +24,14 @@ 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 +50,7 @@ message FuzzyFindReply { oneof kind { Symbol stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } } @@ -63,7 +65,7 @@ message RefsReply { oneof kind { Ref stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } } @@ -128,7 +130,7 @@ message RelationsReply { oneof kind { Relation stream_result = 1; - bool final_result = 2; // HasMore + FinalResult result = 2; } }