Skip to content
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

Don't refer to project headers in *.cpp files as system headers. #4005

Conversation

hzeller
Copy link
Collaborator

@hzeller hzeller commented Nov 8, 2024

Just textual update of includes in *.cpp files, no code changes.

This implements style-guide rule
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

We do use angle bracktes for inlucdes within the headers that are also system-installed with angle brackets so that they can be used in such context. This is the reason why angle brackets made it into the project.

However, within our own implementation we should refer to the local project headers as such, with #include "quoted.h" instead of angled.

Within each compilation unit, the corresponding declaration header should be the very first header (that way we can detect quickly if they are self-contained).

Both of these issues are addressed here.

The includes in header files are not addressed at this point, they are still included as system headers to accomodate the original use-case of installing them system-wide.

Just textual update of includes in *.cpp files, no code changes.

This implements style-guide rule
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

We do use angle bracktes for inlucdes within the headers that are
also system-installed with angle brackets so that they can be used
in such context. This is the reason why angle brackets made it into
the project.

However, within our own _implementation_ we should refer to the local
project headers as such, with #include "quoted.h" instead of
angled.

Within each compilation unit, the corresponding declaration header
should be the very first header (that way we can detect quickly if
they are self-contained).

Both of these issues are addressed here.

The includes in _header_ files are not addressed at this point,
they are still included as system headers to accomodate the original
use-case of installing them system-wide.
@hzeller hzeller requested a review from alaindargelas November 8, 2024 16:48
@hzeller hzeller merged commit 1ed0bac into chipsalliance:master Nov 9, 2024
60 of 61 checks passed
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.

1 participant