Comments (3)
just noting offline discussion:
- refs to base method should be returned when querying derived method
- disagreement over whether refs to derived method should be returned when querying base method
from clangd.
In case it helps to document some existing practice, Eclipse CDT:
- refs to base method should be returned when querying derived method
does this
- disagreement over whether refs to derived method should be returned when querying base method
does not do this.
I think the underlying mental model is that the thing being searched for is the function body / implementation. When searching for the derived implementation, every caller of the base method is at least potentially invoking that derived implementation. When searching for the base implementation, however, calls to the derived method do not invoke the base implementation (except perhaps indirectly if the derived impl delegates to the base one, but that of course is covered by the reference in the derived impl itself).
I do think it would be nice if refs to the base method were annotated as "potential matches" when querying the derived method. LSP does not currently have a way of annotating references with extra info like this, though I've proposed this (with a different annotation in mind) and the response has been favourable.
from clangd.
This has been implemented (references to base methods are shown, but not to derived methods)
from clangd.
Related Issues (20)
- headers from pch are not recognized inside project HOT 8
- clangd does not detect C++17 or newer features when compiled with CMake 3.28 + Ninja on Windows HOT 8
- omit `self` when clangd compltes member function with explicit self HOT 4
- Include Cleaner fails for symbols forward-declared and aliased
- Include cleaner recommends removing includes needed for casts to related types
- Unsupported argument 'cortex-a76.cortex-a55' to option '-mcpu='clang(drv_unsupported_option_argument) HOT 1
- clangd find references, refactor rename works only with opened files HOT 6
- Clangd sometimes fails to deduce non-dependent type inside template HOT 3
- Clangd throws error on working code with CUDA HOT 6
- Include Cleaner doesn't include headers needed by default template arguments HOT 1
- Include Cleaner doesn't recognize uses of `operator bool`
- Include Cleaner recommends removing header needed by template instantiation
- Allocated memory is leaked HOT 3
- Missing go-to-definition on auto types deduced as pointers
- <cerrno> is suggested instead of <errno.h> for errno values when `-std=c99`
- Preserve white spaces and new lines from the comments in hover request
- board support package includes HOT 3
- Folding is not available for preprocessor blocks HOT 1
- clangd loaded unexpected compilation database when multiple instances were launched.
- Poor allocator usage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clangd.