hokein marked an inline comment as done. hokein 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. ---------------- ilya-biryukov wrote: > hokein wrote: > > ilya-biryukov wrote: > > > 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? > > > > > there are others, delegating initializers. > Ah, interesting... Could we add them to the tests too? it has been added in the tests already, without the change here, the test will trigger the `assert(CCI->isAnyMemberInitializer());`. ``` // delegating initializer class $10^Foo { $11^Foo(int$12^); $13^Foo(): $14^Foo(111) {} }; ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69241/new/ https://reviews.llvm.org/D69241 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits