Suppose I am working on a library with a decent number of classes, most of them having a bunch of methods, in addition to the basic ctors and dtor. For reasons, the method implementations are spread across different files, and IDEs tend to fail to detect where the implementation of a method actually is, so that "Go to definition" / "go to declaration" is hit-and-miss, or mostly-miss.
Now, I'm in the middle of work, so not all methods have been implemented. Eventually, in the future, I will have test coverage for every method, and so they will all have to be implemented so as to link succesfully; but for now - there are only a few test programs which don't cover the full range of methods, and those manage to link and run.
I want to be able to determine, for a given method declared in a class, whether it's implemented or not in the library's source code repository, and/or obtain a list of all unimplemented methods.
How would I go about doing that?
Notes:
- Obviously, if I write code which uses a method and link it, that will determine whether it's defined or not. The point is not to have to do that.
- Assume I have a modern GNU/Linux distribution and relevant packages installed. A Windows-specific answer is legitimate but less desirable.
- This question is similar, except that in that case, there are executables failing to link. Also, it was asked 12 years, is constained
- If you would like additional information regarding why the IDE can't discern between implemented and unimplemented methods, please ask in the comments. I'm using CLion 2025.1, although I'm not banking on answers based on my IDE.
virtual
, then you will get undefined reference to vtable if you ever try to create an object of the class in question, without calling that method.-O3
also helps.void foo() { throw unimplemented_error{}; }
convention, but that's just a convention.)--no-undefined
option?