Identifying unnecessary #includes

Bertjan Broeksema bertjan at kdab.com
Sun Apr 4 19:12:52 UTC 2010


On Saturday 03 April 2010 19:07:24 David Nolden wrote:
> It is true that it will never be possible too 100% safely say "this
> include isn't needed", so I guess the best thing we can do is
> highlighting the includes we think are unneeded, and letting the
> developer choose what to do.

Well, I didn't want to disencourage anyone, just wanted to point out that the 
problem of finding unused include is not a trivial one. Actually, it would 
even be cool if the tool can come up with hints like:

If you define a forward decl here, you can move this include to there.

Cheers,

Bertjan




More information about the KDevelop-devel mailing list