Baz
Baz

Reputation: 13145

Removing unused includes

Are there any tools which parse .h files and recommend the removal of #includes. For example if the defines in the include are not being used or if it is possible to do a forward declaration instead.

I work on both windows and linux platforms.

Upvotes: 7

Views: 14234

Answers (3)

Tomasz Kal
Tomasz Kal

Reputation: 129

I was looking for such tool some time ago and I now found out that this functionality is also provided by Resharper C++ plugin for Visual Studio.

Upvotes: 3

Kos
Kos

Reputation: 72279

ReDHead is a project for exactly that. It's an Eclipse plug-in.

Upvotes: 3

John Bartholomew
John Bartholomew

Reputation: 6606

include-what-you-use is intended to do this.

Upvotes: 5

Related Questions