[clangd] Avoid indexing decls associated with friend decls.
Summary: These decls are sometime used as the canonical declarations (e.g. for go-to-def), which seems to be bad. - friend decls that are not definitions should be ignored for indexing purposes - this means they should never be selected as canonical decl - if the friend decl is the only decl, then the symbol should not be indexed Reviewers: sammccall Reviewed By: sammccall Subscribers: mgorny, klimek, ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47623 llvm-svn: 333885
Showing
- clang-tools-extra/clangd/index/SymbolCollector.cpp 13 additions, 0 deletionsclang-tools-extra/clangd/index/SymbolCollector.cpp
- clang-tools-extra/clangd/index/SymbolCollector.h 6 additions, 0 deletionsclang-tools-extra/clangd/index/SymbolCollector.h
- clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp 42 additions, 0 deletionsclang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp
Loading
Please register or sign in to comment