This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Fix an assertion failure in TargetFinder's heuristic resolution of dependent type.
ClosedPublic

Authored by hokein on Jul 29 2020, 5:03 AM.

Details

Summary

The assertion is not true anymore after D82739, this patch just removes
it, and rename related functions.

And also fixes a missing cases.

Diff Detail

Event Timeline

hokein created this revision.Jul 29 2020, 5:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2020, 5:03 AM
hokein requested review of this revision.Jul 29 2020, 5:03 AM
nridge accepted this revision.Jul 29 2020, 10:01 AM

Thanks!

clang-tools-extra/clangd/FindTarget.cpp
171

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.

This revision is now accepted and ready to land.Jul 29 2020, 10:01 AM
hokein added inline comments.Jul 30 2020, 12:06 AM
clang-tools-extra/clangd/FindTarget.cpp
171

yeah, I agree. It would be clearer if these functions are put into a Heuristic context.