Skip to content

avoid dependency on transitive includes - based on include-what-you-use#3757

Merged
danmar merged 2 commits into
cppcheck-opensource:mainfrom
firewave:iwyu-add
Jan 27, 2022
Merged

avoid dependency on transitive includes - based on include-what-you-use#3757
danmar merged 2 commits into
cppcheck-opensource:mainfrom
firewave:iwyu-add

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Jan 26, 2022

This does not add additional dependencies it just makes the existing ones explicitly.

It will also prevent breakage in case an include will remove another include as it usually happens with new versions of GCC/libstdc++ (including the upcoming GCC 12). This prevented me from bisecting older performance regressions with a current GCC because some files lacked a limits include.

I did not clean up the GUI code yet since there's an performance issue with the Qt include mapping in the current version of include-what-you-use.

@firewave
Copy link
Copy Markdown
Collaborator Author

This is currently still a draft since it is a good testcase for the assumed performance impact by header which are included more than once and I want to make sure we do not regress the selfcheck even more. See https://trac.cppcheck.net/ticket/10761 for a ticket about this.

@firewave
Copy link
Copy Markdown
Collaborator Author

An on-demand GitHub Action which produces the output is added in #3759.

@firewave
Copy link
Copy Markdown
Collaborator Author

This is currently still a draft since it is a good testcase for the assumed performance impact by header which are included more than once and I want to make sure we do not regress the selfcheck even more. See https://trac.cppcheck.net/ticket/10761 for a ticket about this.

With these changes I can indeed confirm that the same include is inlined multiple times affecting the amount of code which is being processed.

@firewave firewave marked this pull request as ready for review January 27, 2022 14:48
@danmar danmar merged commit 171da2e into cppcheck-opensource:main Jan 27, 2022
@firewave firewave deleted the iwyu-add branch January 27, 2022 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants