Testing with 19.0.1, when I do Ctrl+/ on validate, I'm prompted whether I want C99::validate() or B::validate().
If I choose C99::validate(), I only see B::validate(), which is a reference by virtue of being the declaration in a parent class, and C99::validate(), which is the item I selected.
If I choose B::validate(), I see all four references, which is correct, because they are all related by inheritence to the parent class B.
In your screen shot, it's hard to tell if what I happening is correct or not because I don't know your class hierarchy. Which of the following classes inherit from SspInterface? Which of the following classes use SspInterface or a class that derives from SspInterface, or call the Initialize() method from an abstract class that SspInterface derives from.
- AccelInterface?
- BitManager?
- BsaInterface?
- CalibrationMangager?
- CameraManager?
- CiuInterface?
- CmdRouter?
- EnvInterface?
- FaultManager?
- HwInterface?
- IrAlgorithms?
- LineOfSight?
I notice that the reference in IrAlgorithms.cpp is in an unrecognized code region, so there must be some preprocessing going on there, or some very unusual code construct that the parser did not recognize. Maybe it's incomplete code.
Polymorphism can be great, but it does create situations where code navigation gets more difficult. Every time you have some thing like the following example, there is no guessing what sub-class is being called, except at run-time, of course. An overuse of this construct can decompose a strongly typed language down to being as hard to statically analyze (ie, read the code) as an run-time typed scripting language.
CommonInterface *pci = something;
pci->Initialize();
// 200 classes derive from "CommonInterface" and redefine Initialize()
// This call could be to ANY one of them.