3

We have a large C/C++ legacy source tree that has been around the block a few times. We expect there are a substantial number of methods no longer used. Is there a tool that can help us quickly identify the unused code?

Coding Mash
  • 3,338
  • 5
  • 24
  • 45

3 Answers3

5

You should get a good static code analyzer.

Look around here for suitable option.

  1. Is there any free C++ code coverage tool which is useful?
  2. What tools do you use for static code analysis?
  3. What is your favourite Code Coverage tool(s) (Free and non-free)

Also check out CTC++ Test Coverage Analyser

Community
  • 1
  • 1
prakash
  • 58,901
  • 25
  • 93
  • 115
  • With these tools you list, and GCov below, do they do static analysis of the code and tell you with certainty that function are not called, or do they just monitor which functions are called during runs of the program? – i_am_jorf Jun 26 '09 at 20:36
1

For GCC there is GCov.

oz10
  • 153,307
  • 27
  • 93
  • 128
0

At work, we use AQTime for any profiling needs. It comes with a static analysis tool, which should be what you need. However, if you don't need the other profilers or run on a platform or compiler not supported by AQTime, it is overkill, money-wise at least.

OregonGhost
  • 23,359
  • 7
  • 71
  • 108