Currently, when check-header-includes finds an unnecessary #include, it doesn't know if the class needs to be forward-declared or not. We should change it to parse the entire class hierarchy first and use that information to decide if a forward-declaration is necessary.
Talked to eseidel about this, and it looks like scripts like this are not very useful, and instead we should be looking at the headers that include a large number of other headers, or the most included headers, and try to optimize those one at a time. So I'm closing this bug and removing check-header-includes from the repository, since even the upgraded version I have is only a marginal improvement over find-extra-includes.
Created attachment 61344 [details] remove check-header-includes
Comment on attachment 61344 [details] remove check-header-includes OK.
patch landed: r63184.