[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-26 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359284: [clangd] Query index in code completion no-compile mode. (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANG

[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: unittests/clangd/SourceCodeTests.cpp:325 +TEST(SourceCodeTests, VisibleNamespaces) { + std::vector>> Cases = { sammccall wro

[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 196676. sammccall added a comment. Fix test. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61077/new/ https://reviews.llvm.org/D61077 Files: clangd/CodeComplete.cpp clangd/SourceCode.cpp clangd/SourceCo

[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 196674. sammccall marked an inline comment as done. sammccall added a comment. Correctly handle absolutely qualifier (::foo::bar). Fix seed scopes for proximity to be consistent with Sema case. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTIO

[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added inline comments. Comment at: clangd/SourceCode.cpp:503 +case tok::l_brace: + if (State == NamespaceName) { +// Parsed: namespace { kadircet wrote: > I believe it is safe to ignore(just

[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 196671. sammccall marked 2 inline comments as done. sammccall added a comment. Add comments, add anon-namespacce test, tighten parsing rules slightly (`namespace ::...` is illegal) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://

[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/SourceCode.cpp:503 +case tok::l_brace: + if (State == NamespaceName) { +// Parsed: namespace { I believe it is safe to ignore(just mark the opening brace) anonymous namespaces here. Since there

[PATCH] D61077: [clangd] Query index in code completion no-compile mode.

2019-04-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, mgrang, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We scrape the enclosing scopes from the source file, and use them in the query. Repository: rCTE Clan