How can I eliminated functions which aren't called from my C++ Project? I have a legacy code base where 70% of the source code is unused because people didn't bother to remove functions when they were no longer needed.
I've seen this question on the Internet, but people often reply with dynamic code coverage tools.
A dynamic tool won't help. During a particular program run, functions may not run which could be called under different circumstances.
A static tool could be very simplistic, merely collecting functions names from header files and .cpp files, and looking at the symbols within each function as possible function references. By creating and following a call tree, one can start from main and determine which functions could get called. Any function not in that call tree could then be eliminated from the code base.
Does something like this exist? Either free or including a free trial (I'd rather not spend the money until I see it work)?
Thanks for any help,