3

Possible Duplicate:
Tools to find included headers which are unused?

I would like to check useless header file in c++ files(.h and .cpp)

During developing, There are so many relations between files.

So it cause compile time more longer.

Can you tell me what's the tool that help me.

Thank you.

Community
  • 1
  • 1
Simon Kim
  • 377
  • 1
  • 6
  • 9

2 Answers2

0

Have a look at the Dehydra.

From the website:

Dehydra is a lightweight, scriptable, general purpose static analysis tool capable of application-specific analyses of C++ code. In the simplest sense, Dehydra can be thought of as a semantic grep tool.

It should be possible to come up with a script that checks for unused #include files.

Ton van den Heuvel
  • 10,157
  • 6
  • 43
  • 82
-1

I use lint, Verify the link, it does mention unused variables, unreachable statements and many more.

Narendra N
  • 1,270
  • 1
  • 9
  • 14