sammccall accepted this revision.
sammccall added a comment.

Ilya's suggestion to have a single index on the CodeCompleteOptions that 
encapsulates the merging seems reasonable to me, but not urgent.
So let's get this in as-is and we can make that change whenever.


================
Comment at: clangd/CodeComplete.cpp:568
+  // FIXME: Find out a better way to show the index source.
+  llvm::raw_string_ostream Label(Item.label);
+  if (!DebuggingLabel.empty()) {
----------------
move this inside and only use for nontrivial case?


================
Comment at: clangd/CodeComplete.cpp:661
     Results.items.clear();
+    Results.isIncomplete = false;
+    // FIXME: figure out a good algorithm to merge symbols from different
----------------
Shouldn't it already be false here?


================
Comment at: clangd/CodeComplete.cpp:666
                       CompletedName.Filter, &Results);
+    if (Opts.StaticIndex) {
+      completeWithIndex(Ctx, *Opts.StaticIndex, Contents, 
*CompletedName.SSInfo,
----------------
do you only want to use the static index if the dynamic index is also present?
(That logic may exist at a higher level, but I'm not sure it makes sense to 
have it here)

I'd suggest to remove the result items empty check and the clear(), and then 
just put the two index runs in independent if statements


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D41668



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to