[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 30 01:05:51 PST 2018


ioeric marked an inline comment as done.
ioeric added inline comments.


================
Comment at: unittests/clangd/CodeCompleteTests.cpp:419
 
+TEST(CompletionTest, SkipInjectedWhenUnqualified) {
+  EXPECT_THAT(completions("struct X { void f() { X^ }};").Completions,
----------------
kadircet wrote:
> Could you also add a test for the inheritance of injected class name? For ex:
> 
> ```
> struct X {};
> struct T : private X {};
> struct F : public T {
> X^ <-- this is inavlid and we should not suggest X here, since it is inaccessible.
> ::X^ <-- this should be Ok.
> };
> ```
Happy to improve the test coverage. But I couldn't see how this tests changes in this patch. It seems something sema access should be testing and a bit out of scope? Could you elaborate on the intention? Thanks!


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55065/new/

https://reviews.llvm.org/D55065





More information about the cfe-commits mailing list