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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits