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

chore(clang-tidy): Add clang-tidy rules: prefer-member-initializer and optin.performance.Padding #3716

Merged
merged 4 commits into from
Feb 10, 2022

Conversation

Skylion007
Copy link
Collaborator

Description

  • Adds rule and proper suppression for clang-tidy prefer-member-initializer
  • Adds optin analyzer rule to ensure we do not introduce any poorly padded structs.

Suggested changelog entry:

* Enable cppcoreguidelines-prefer-member-initializer and clang-analyzer-optin.performance.Padding clang-tidy checks

@rwgk
Copy link
Collaborator

rwgk commented Feb 10, 2022

The appveyor build is still stuck. But I've never seen it actually-running-and-failing when the GHA succeeded (not a single time). ... Merging!

@rwgk rwgk merged commit d6c66d2 into pybind:master Feb 10, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Feb 10, 2022
@@ -89,7 +89,9 @@ struct buffer_info {
? std::vector<ssize_t>(view->strides, view->strides + view->ndim)
: detail::c_strides({view->shape, view->shape + view->ndim}, view->itemsize),
(view->readonly != 0)) {
// NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these suppressed instead of fixed?

@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Mar 29, 2022
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.

3 participants