Closed
Bug 557565
Opened 15 years ago
Closed 7 years ago
Create a static analysis script for detecting unneeded #include statements
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 903843
People
(Reporter: ehsan.akhgari, Assigned: mwu)
References
Details
We have a habit of including everything everywhere. This hurts compile times because:
1. The compiler has to read more files.
2. More files will be rebuilt when a header is changed that needed.
3. This makes things like ccache not provide us as much benefit as they would otherwise.
We were talking about a static analysis script which can detect which #include statements are not needed in a translation unit, and can be removed. Here's the bug to ask the wonderful static analysis folks to make it happen!
Updated•15 years ago
|
Blocks: static_analyses
Andrew, I seem to remember you mentioning writing a script for this ... do I remember correctly?
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Comment 2•13 years ago
|
||
A Google employee is working on a clang-based tool to do just this:
http://code.google.com/p/include-what-you-use/
This is already being tried out on the JS Engine in Bug 634839.
Comment 3•13 years ago
|
||
(In reply to comment #2)
> A Google employee is working on a clang-based tool to do just this:
> http://code.google.com/p/include-what-you-use/
> This is already being tried out on the JS Engine in Bug 634839.
So is mwu :)
His version will patch the code too
Assignee: nobody → mwu
Assignee | ||
Comment 4•13 years ago
|
||
Looks like theirs does a bit more but then again, they've been working on their tool longer.
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•