[PATCH] D44954: [clangd] [RFC] Add more symbols to the index
Marc-Andre Laperle via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 27 13:52:50 PDT 2018
malaperle planned changes to this revision.
malaperle added inline comments.
================
Comment at: clangd/index/Index.h:142
+ // Whether or not the symbol should be considered for completion.
+ bool ForCompletion = false;
/// A brief description of the symbol that can be displayed in the completion
----------------
I'm thinking of replacing this with something like:
Decl::Kind DeclContextKind;
bool IsScoped (enum);
bool IsInMainFile;
================
Comment at: clangd/index/Index.h:255
+ /// A flag to restrict the results to completion matches.
+ bool CompletionMatchesOnly = false;
};
----------------
Would be removed when "ForCompletion" is replaced.
================
Comment at: clangd/index/MemIndex.cpp:48
continue;
+ if (Req.CompletionMatchesOnly && !Sym->ForCompletion)
+ continue;
----------------
Would be removed when "ForCompletion" is replaced.
================
Comment at: clangd/index/SymbolCollector.cpp:124
+
+bool isForCompletion(const NamedDecl *ND, ASTContext *ASTCtx) {
+ using namespace clang::ast_matchers;
----------------
This code would be replaced with setting individual Symbol fields instead.
================
Comment at: clangd/index/SymbolCollector.cpp:342
+ if (isForCompletion(&ND, ASTCtx)) {
+ S.ForCompletion = true;
+ getLabelAndInsertText(*CCS, &Label, &SnippetInsertText,
----------------
Here we would set fields that will replace "ForCompletion"
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44954
More information about the cfe-commits
mailing list