-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include-what-you-use changes and #include section reorganization #452
base: master
Are you sure you want to change the base?
Conversation
23108b1
to
27e8163
Compare
This is ready for review now if someone is able to take a look. I'm not sure why the macOS build is failing, but it seems unrelated and builds fine on my machine. Thank you! |
This commit applies changes suggested by include-what-you-use. I did not apply all of them as there are some false positives/negatives and it did not recognize forward decls in some cases, and also tends to suggest headers that should not be included, such as files in the bits/ directory on Linux, but most changes have been applied.
This commit applies a few cleanups to the #include sections: - Remove old version checks for Visual Studio, SUSE Linux, and DragonFly BSD - Alphabetize the includes - Consolidate multiple MSC_VER checks in the same file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! Please see my comments
} | ||
|
||
namespace pcm { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these lines can be deleted
#include <vector> | ||
#include <vector> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2x include vector
#include <iomanip> | ||
#include <string> | ||
#include <utility> | ||
#include <utility> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2x include utility
#include <sys/time.h> // for gettimeofday() | ||
#endif | ||
#include "types.h" | ||
#include "types.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2x include types.h
#include <fstream> | ||
#include <iomanip> | ||
#include <iostream> | ||
#include <iostream> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2x include iostream
} | ||
|
||
namespace pcm | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop these lines "} namespace pcm {"
class HyperThread; | ||
class ServerUncore; | ||
class ClientUncore; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop these lines
#else | ||
#include <intrin.h> | ||
#endif | ||
|
||
namespace pcm { | ||
class PCM; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop these lines "} namespace pcm {"
|
||
namespace pcm { | ||
class MMIORange; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop these lines "} namespace pcm {"
class PCM; | ||
class CoreTaskQueue; | ||
class SystemRoot; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop these lines "} namespace pcm {"
Thank you for accepting this contribution - it is always a team effort by multiple people. Unfortunately I have some travel this week so my time to update the change will limited and I will better know my schedule next week. Again, many thanks for accepting this. |
Also, I meant to address if anyone thought running IWYU as a regular process should be considered. In my experience it has a few false positives (e.g., the reason forward decls are in a separate |
Hey there, I unfortunately got a little sidetracked for a few months with moving and some non-project related tasks, but could definitely still update this and resubmit it. Need to get my VMs set up again so it may be a couple of weeks. |
This is an initial run of IWYU over PCM sources, but isn't ready for review - just checking builds on platforms I don't have installed (FreeBSD, Windows)