-
Notifications
You must be signed in to change notification settings - Fork 199
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
Clang-tidy CI test: bump version from 15 to 16 #5592
base: development
Are you sure you want to change the base?
Clang-tidy CI test: bump version from 15 to 16 #5592
Conversation
@@ -112,7 +112,7 @@ public: | |||
} | |||
|
|||
private: | |||
const amrex::BoxArray& m_grids; |
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.
I am not fully convinced about this substitution. Maybe a (possibly smart) pointer would be better, in order to avoid copies.
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.
What do you think?
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.
Hm, also should this change when we load balance or was the PML BoxArray special?
Is there a specific reason why you want to move to version 16 as opposed to even newer versions? |
@EZoni , the main reason is to split into two PRs the changes that will be required with newer versions of |
@@ -112,7 +112,7 @@ public: | |||
} | |||
|
|||
private: | |||
const amrex::BoxArray& m_grids; | |||
amrex::BoxArray m_grids; |
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.
Why not simply a ref?
amrex::BoxArray m_grids; | |
amrex::BoxArray & m_grids; |
This PR bumps the version used for
clang-tidy
CI tests from 15 to 16.It also addresses all the issues found with the upgraded tool.
Most of the issues are related to this newly introduced check:
The check enforces CppCoreGuidelines about constant and reference data members .
In general, I understand the argument against using constant or reference data members. There is however one case in which I am not fully convinced by the suggestion of the tool: in PML.H
const amrex::BoxArray& m_grids;
becomesamrex::BoxArray m_grids;
and I am wondering if this can be an issue for performances. Maybe we could consider using a (possibly smart) pointer to theBoxArray
, instead of making a copy.Few issues were instead related to these checks:
modernize-loop-convert
This check was already enabled, but
clang-tidy-16
broadens its scope with respect to previous versions.modernize-use-auto
Only one case. I am a bit confused because this should have been found also by version 15 of the tool.
misc-use-anonymous-namespace
This is a new check. Actually, the issues found with this check were false positives, but they disappeared when I properly set
misc-use-anonymous-namespace.HeaderFileExtensions
in the.clang-tidy
configuration file to recognize.H
files as headers.misc-misplaced-const
Only one case. I am a bit confused because this should have been found also by version 15 of the tool.
readability-misleading-indentation [NOW DISABLED DUE TO FALSE POSITIVES]
This check was already enabled. However, with this newer version of the tool, it seems to me that it generates some false positives. Therefore, I would like to propose to disable it. We may try to re-enable it when we will bump the version from 16 to 17.