Are there any no-cost tools (or direct Eclipse CDT plugins) that scan C++ code for unused functions, methods, variables, includes...?
I only found this stuff for C# and Java, but I'd like to have it for C++.
Cppcheck and also compilers can find unused variables in a scope, but they don't find, for example, unused member functions in classes or unused includes in a .cpp file. It would be good to have something like that to find deprecated and old code in the project.
A version of "NDepend" exists for C++ (cppdepend). I haven't tried it, but I did use NDepend in the past. It should be good, YMMV.
Deheader, by the estimable Eric S Raymond, will find unused includes. For everything else I use Visual Studio's static analysis tools.
PCLint is a good one for this kind of static analysis.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With