[clangd] Include debugging tags for both static and dynamic index. NFC

llvm-svn: 322379
This commit is contained in:
Sam McCall 2018-01-12 17:09:49 +00:00
parent 3b9843f0ff
commit 93483e7f39
2 changed files with 4 additions and 4 deletions

View 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;
}

View 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) {