diff options
Diffstat (limited to 'clang-tools-extra/clangd/index/Index.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/index/Index.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/index/Index.cpp b/clang-tools-extra/clangd/index/Index.cpp index 6d26dc849d2..7f598643423 100644 --- a/clang-tools-extra/clangd/index/Index.cpp +++ b/clang-tools-extra/clangd/index/Index.cpp @@ -55,6 +55,23 @@ static void own(Symbol &S, DenseSet<StringRef> &Strings, Intern(S.Name); Intern(S.Scope); Intern(S.CanonicalDeclaration.FilePath); + + Intern(S.CompletionLabel); + Intern(S.CompletionFilterText); + Intern(S.CompletionPlainInsertText); + Intern(S.CompletionSnippetInsertText); + + if (S.Detail) { + // Copy values of StringRefs into arena. + auto *Detail = Arena.Allocate<Symbol::Details>(); + Detail->Documentation = S.Detail->Documentation; + Detail->CompletionDetail = S.Detail->CompletionDetail; + S.Detail = Detail; + + // Intern the actual strings. + Intern(S.Detail->Documentation); + Intern(S.Detail->CompletionDetail); + } } void SymbolSlab::Builder::insert(const Symbol &S) { |

