We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, to efficiently find unused functions, the source browser is generally very useful - just only for C code.
For C++ code, this gets very tedious, as: - C++ member functions are not displayed as "Functions", but as "Types" (together with a tremendous amount of "other things"). - The classname is NOT shown in the browser list.
It would be VERY useful, if the C++ class functions would be included in the browser as function, e. g. written ClassName::FunctionName (for function FunctionName in class ClassName).
Then I could sort by reference, and check any function which has only 1 or 2 references ... .
With the current sorting in the types field, it is nearly impossible to sort out functions with only 1 or 2 references.
The same applies to class data members - thes also should be displayed as "Data", and not as "Types".
The linker option --feedback=filename generates some nice text file to find unused functions (also inside classes).
I think there is nothing similar for unused data fields - but I think unused data fields are "optimized away" anyway by the linker. (?)
The misc control command
--feedback=!UnusedFunctions!.Txt
does remove unused code and reduces image size.