New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textDocument/implementation doesn't resolve local classes #644
Comments
Type hierarchy has the same issue. |
Thanks for filing this. |
Would it be wise to index just polymorphic classes inside functions, blocks, lambdas etc. There may be a case to index all records, but i feel there could be too much of a penalty there. |
As discussed offline with @usx95, indexing function-local classes (and its methods) looks like a reasonable fix. I think it is worth to try this solution and see how it goes (measuring the size of the index and the performance of the index). |
Sent https://reviews.llvm.org/D94785 for review. |
Thanks for fixing this 👍 |
Previously we did not record local class declarations. Now with features like findImplementation and typeHierarchy, we have a need to index such local classes to accurately report subclasses and implementations of methods. Performance testing results: - No changes in indexing timing. - No significant change in memory usage. - **1%** increase in #relations. - **0.17%** increase in #refs. - **0.22%** increase #symbols. **New index stats** Time to index: **4:13 min** memory usage **543MB** number of symbols: **521.5K** number of refs: **8679K** number of relations: **49K** **Base Index stats** Time to index: **4:15 min** memory usage **542MB** number of symbols: **520K** number of refs: **8664K** number of relations: **48.5K** Fixes: clangd/clangd#644 Differential Revision: https://reviews.llvm.org/D94785
Previously we did not record local class declarations. Now with features like findImplementation and typeHierarchy, we have a need to index such local classes to accurately report subclasses and implementations of methods. Performance testing results: - No changes in indexing timing. - No significant change in memory usage. - **1%** increase in #relations. - **0.17%** increase in #refs. - **0.22%** increase #symbols. **New index stats** Time to index: **4:13 min** memory usage **543MB** number of symbols: **521.5K** number of refs: **8679K** number of relations: **49K** **Base Index stats** Time to index: **4:15 min** memory usage **542MB** number of symbols: **520K** number of refs: **8664K** number of relations: **48.5K** Fixes: clangd/clangd#644 Differential Revision: https://reviews.llvm.org/D94785
Take this annotated example, where implementation is called on the points
$^
and returns the corresponding ranges$[[]]
As can be seen, the implementation(
D
) infoo
is not returned.This behaviour appears to happen when everything is defined in the same file, or if the implementations are in their own cpp file.
The text was updated successfully, but these errors were encountered: