[PATCH] D84837: [clangd] Fix an assertion failure in TargetFinder's heuristic resolution of dependent type.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 30 00:06:50 PDT 2020
hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:171
// or more declarations that it likely references.
-std::vector<const NamedDecl *> resolveDependentExprToDecls(const Expr *E) {
- assert(E->isTypeDependent());
+std::vector<const NamedDecl *> resolveExprToDecls(const Expr *E) {
if (const auto *ME = dyn_cast<CXXDependentScopeMemberExpr>(E)) {
----------------
nridge wrote:
> I do think the "heuristic" nature of this function is an important part of its interface that's currently lost with this rename.
>
> However, I think that's fine for now. In a future refactor (to get code-completion to use this machinery as well) I plan to move these functions into a `HeuristicResolver` class or a `heuristics` sub-namespace or something like that.
yeah, I agree. It would be clearer if these functions are put into a `Heuristic` context.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84837/new/
https://reviews.llvm.org/D84837
More information about the cfe-commits
mailing list