hokein added inline comments.
================ Comment at: clangd/CodeComplete.cpp:653 +// Get all scopes that will be queried in indexes. +std::vector<std::string> getQueryScopes(Sema &S, + CodeCompletionContext &CCContext) { ---------------- sammccall wrote: > as Ilya pointed out to me, passing Sema around is a big scary thing that we > should try to avoid. Here it's only used to get the text if the CXXScopeSpec > is invalid. Can we pass just the SourceManager, or better yet, the text as a > StringPiece? SG, we don't need the Sema to compute the `DeclContext` from scope specifier. SourceManager is the only thing we need from `Sema` now. ================ Comment at: clangd/CodeComplete.cpp:695 + Info.UnresolvedQualifier = + Lexer::getSourceText(CharSourceRange::getCharRange((*SS)->getRange()), + S.getSourceManager(), clang::LangOptions()); ---------------- sammccall wrote: > do you need to remove any leading :: here? Not needed, as Sema exclues the trailing "::". Added a comment. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42073 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits