Alex Rivera | Logout

Finding "dead code" in a large C++ legacy application

Asked 2010-03-04T14:50:12.653
68

I'm currently working on a large and old C++ application that has had many developers before me. There is a lot of "dead code" in the project, classes and functions that aren't used by anyone anymore.

What tools are available for C++ to make a analysis of large code base to detect and refactor dead code? Note: I'm not talking about test coverage tool like gcov.

How do you find dead code in your project?

Edit
Report

1 Answer

0

See our SD C++ Test Coverage.

You need to do a lot of dynamic testing to exercise the code, to make sure you hit the maximum amount of coverage. Code "not covered" may or may not be dead; perhaps you simply didn't have a test case to exercise it.

answered 2010-03-12T00:15:02.733

Your Answer