[PATCH] D89851: [clangd] Separate final_result into a different message; NFC

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 08:45:44 PDT 2020


kbobyrev updated this revision to Diff 299705.
kbobyrev added a comment.

Fix proto formatting


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89851/new/

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,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;
   }
 }
 
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());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89851.299705.patch
Type: text/x-patch
Size: 1666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201021/12c97c90/attachment.bin>


More information about the cfe-commits mailing list