hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land.
thanks, looks good. ================ Comment at: clang-tools-extra/clangd/FindTarget.cpp:64 +// resolves it to a CXXRecordDecl in which we can try name lookup. +CXXRecordDecl *resolveTypeToRecordDecl(const Type *T) { + if (auto *ICNT = T->getAs<InjectedClassNameType>()) { ---------------- nit: add assert(T), or even use `const Type&` as the parameter type. ================ Comment at: clang-tools-extra/clangd/FindTarget.cpp:158 +// or more declarations that it likely references. +std::vector<const NamedDecl *> resolveDependentExprToDecls(const Expr *E) { + switch (E->getStmtClass()) { ---------------- nit: add `assert(E->isTypeDepndent())`; ================ Comment at: clang-tools-extra/clangd/FindTarget.cpp:159 +std::vector<const NamedDecl *> resolveDependentExprToDecls(const Expr *E) { + switch (E->getStmtClass()) { + case Stmt::CXXDependentScopeMemberExprClass: { ---------------- nit: looks like the code will be a bit simpler if we just use if branch like ``` if (const auto * a = dyn_cast<XX>(xxxx)); ``` but up to you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83371/new/ https://reviews.llvm.org/D83371 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits