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

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 20 23:39:49 PDT 2020


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


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


More information about the cfe-commits mailing list