[PATCH] D46795: [clangd] Don't query index when completing inside classes
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 14 03:52:44 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: unittests/clangd/CodeCompleteTests.cpp:829
+TEST(CompletionTest, NoIndexCompletionsInsideClasses) {
+ // clang-format off
+ auto Completions = completions(R"cpp(
----------------
sammccall wrote:
> Can we avoid disabling clang-format here? I do find it useful, and it adds noise.
> IIRC moving the `.items` into the `EXPECT_THAT` results in sensible formatting.
Thanks! I struggled to rewrite code in a way that makes clang-format happy.
================
Comment at: unittests/clangd/CodeCompleteTests.cpp:845
+
+TEST(CompletionTest, NoIndexCompletionsInsideDependentCode) {
+ {
----------------
sammccall wrote:
> I think one of these would be enough, but up to you
Those test different kinds of `NestedNameSpecifier`s (`Type`, `TypeSpecWithTemplate` and `Identifier`), so I'd keep all of them to make sure we have good coverage on that front.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46795
More information about the cfe-commits
mailing list