[PATCH] D69241: [clangd] Handle the missing constructor initializers in findExplicitReferences.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 22 06:10:35 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:677
     if (const CXXCtorInitializer *CCI = N.get<CXXCtorInitializer>()) {
-      if (CCI->isBaseInitializer())
-        return refInTypeLoc(CCI->getBaseClassLoc());
-      assert(CCI->isAnyMemberInitializer());
-      return {ReferenceLoc{NestedNameSpecifierLoc(),
-                           CCI->getMemberLocation(),
-                           /*IsDecl=*/false,
-                           {CCI->getAnyMember()}}};
+      // Other type initializers (e.g. base initializer) are handled by visiting
+      // the typeLoc.
----------------
I believe base initializers are the only ones left, but the comment suggests there are more cases. Maybe change to:
```
// Base initializers are handled by visting the type loc.
```
Or am I missing something?



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69241





More information about the cfe-commits mailing list