Skip to content

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

Merged
rwgk merged 4 commits into
pybind:masterfrom
Skylion007:clang-tidy-prefer-member-initializer
Feb 10, 2022
Merged

chore(clang-tidy): Add clang-tidy rules: prefer-member-initializer and optin.performance.Padding#3716
rwgk merged 4 commits into
pybind:masterfrom
Skylion007:clang-tidy-prefer-member-initializer

Conversation

@Skylion007

Copy link
Copy Markdown
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

rwgk commented Feb 10, 2022

Copy link
Copy Markdown
Collaborator

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:masterFeb 10, 2022
@github-actionsgithub-actionsBot added the needs changelog Possibly needs a changelog entry label Feb 10, 2022
? 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
Copy Markdown
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?

@henryiiihenryiii removed the needs changelog Possibly needs a changelog entry label Mar 29, 2022
@rwgkrwgk mentioned this pull request Feb 10, 2023
Sign up for freeto 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

@Skylion007@rwgk@henryiii