This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Collect name references in the index.
ClosedPublic

Authored by hokein on Oct 23 2019, 5:37 AM.

Details

Summary

This is used for cross-file rename. When renaming a class, we expect to
rename all related constructors/destructors.

Diff Detail

Event Timeline

hokein created this revision.Oct 23 2019, 5:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 23 2019, 5:37 AM
ilya-biryukov accepted this revision.Oct 23 2019, 5:45 AM

LGTM.

clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
633

maybe use unnamed ranges?
having $foo[[]] instead of [[]] only hurt readability

This revision is now accepted and ready to land.Oct 23 2019, 5:45 AM
kadircet accepted this revision.Oct 23 2019, 6:01 AM
kadircet marked an inline comment as done.
kadircet added inline comments.
clang-tools-extra/clangd/index/SymbolCollector.cpp
268

This also implies that find refs on a class type will also report locations for constructors and destructors. I believe that's the behavior we decided to have in our offline discussions, just statin in here for future reference.

Build result: fail - 59565 tests passed, 2 failed and 805 were skipped.

failed: LLVM.tools/llvm-ar/mri-utf8.test
failed: LLVM.tools/llvm-objdump/X86/disassemble-functions.test

Log files: cmake-log.txt, ninja_check_all-log.txt, CMakeCache.txt

hokein updated this revision to Diff 226139.Oct 23 2019, 7:56 AM
hokein marked an inline comment as done.

address comment.

Build result: fail - 59566 tests passed, 1 failed and 805 were skipped.

failed: LLVM.tools/llvm-ar/mri-utf8.test

Log files: cmake-log.txt, ninja_check_all-log.txt, CMakeCache.txt

This revision was automatically updated to reflect the committed changes.