[clangd] Include debugging tags for both static and dynamic index. NFC
authorSam McCall <sam.mccall@gmail.com>
Fri, 12 Jan 2018 17:09:49 +0000 (17:09 +0000)
committerSam McCall <sam.mccall@gmail.com>
Fri, 12 Jan 2018 17:09:49 +0000 (17:09 +0000)
llvm-svn: 322379

clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp

index 48522eb..e2fc501 100644 (file)
@@ -671,10 +671,10 @@ CompletionList codeComplete(const Context &Ctx, PathRef FileName,
     // engine).
     if (Opts.Index)
       completeWithIndex(Ctx, *Opts.Index, Contents, *CompletedName.SSInfo,
-                        CompletedName.Filter, &Results);
+                        CompletedName.Filter, &Results, /*DebuggingLabel=*/"D");
     if (Opts.StaticIndex)
       completeWithIndex(Ctx, *Opts.StaticIndex, Contents, *CompletedName.SSInfo,
-                        CompletedName.Filter, &Results, /*DebuggingLabel=*/"G");
+                        CompletedName.Filter, &Results, /*DebuggingLabel=*/"S");
   }
   return Results;
 }
index 1cc95e9..39f9117 100644 (file)
@@ -526,8 +526,8 @@ TEST(CompletionTest, StaticAndDynamicIndex) {
       void f() { ::ns::^ }
   )cpp",
                              Opts);
-  EXPECT_THAT(Results.items, Contains(Labeled("[G]XYZ")));
-  EXPECT_THAT(Results.items, Contains(Labeled("foo")));
+  EXPECT_THAT(Results.items, Contains(Labeled("[S]XYZ")));
+  EXPECT_THAT(Results.items, Contains(Labeled("[D]foo")));
 }
 
 TEST(CompletionTest, SimpleIndexBased) {