Hi Michael, On Thu, Mar 1, 2012 at 12:28, Albert Thuswaldner <[email protected]> wrote: > Hi Stephan and Michael, > > On Wed, Feb 29, 2012 at 19:12, Michael Meeks <[email protected]> wrote: >> >> Well - the pre-compiled headers would make -tons- of includes look >> useless anyway, though (I thought) we had decided to get rid of them as >> an under-maintained and bad job anyway ;-) >> >> Have you tried acting on this lot: >> >> Looking for useless includes in header files... >> AccessibleCell.hxx --> global.hxx (useless) >> AccessibleCellBase.hxx --> global.hxx (useless) >> AccessiblePreviewHeaderCell.hxx --> global.hxx (useless) >> AccessibleTableBase.hxx --> global.hxx (useless) >> ... >> >> And turning it into some patches to remove those headers & seeing if >> it >> compiles nicely ? if so it'd be nice to include that no doubt. >> > > Sure, I can do that, I'll give it a spin and see if it pops...
To get back to you on this, I have now done a test run where I have gone through a couple (about 20) of random selected files from the ones flagged by the analyze script. The conclusion is that there are too many false positives generated with this method atm. I did not find any real useless includes in the sample. Analyzing the includes marked as useless in more detail all (from the tested sample) provide custom data type definitions which _are_ used in the header file. So this relation seems to be overlooked some how by the script. I've checked the doxygen output (i.e the generated html), in those files this relation is actually captured. This leaves me to believe that the error is either in perlmod or the script itself. I do get warning messages when running the script, but I have not analyzed them in detail. Perl does not come natural to me, that's why I shamelessly CC'ing Thomas Collerton, who seems to be the perl-guy around here. ;) So Thomas, would you be interested to help out with some perl debugging? :) If you do want to help, I can send you the necessary files (they break the 500k limit of this ML) on perlmod: http://www.stack.nl/~dimitri/doxygen/perlmod.html ---- On a general note, it would be great to have one tool up and running so we, as a start, at least could quantify how large the problem with useless includes really is. I'm willing to make an effort on this and have already checked another tool cppclean http://code.google.com/p/cppclean/, without success. Next, would be to check iwyu http://code.google.com/p/include-what-you-use/. To get started with this it would be great to know the status regarding LLVM/clang, can it be used build master (without too much hassle)? I've also checked what Mozilla has been up to in this area: https://bugzilla.mozilla.org/show_bug.cgi?id=557565 https://bugzilla.mozilla.org/show_bug.cgi?id=634839 https://bugzilla.mozilla.org/show_bug.cgi?id=430328 Rather long email, hope you didn't get bored. /Albert _______________________________________________ LibreOffice mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice
