Skip to content

[codemod] Match parameter names and = default - #9737

Closed
goldsborough wants to merge 1 commit into
pytorch:masterfrom
goldsborough:clang-tidy-fixes
Closed

goldsborough wants to merge 1 commit into
pytorch:masterfrom
goldsborough:clang-tidy-fixes

Conversation

@goldsborough

Copy link
Copy Markdown
Contributor

More clang tidy cleanups in torch/csrc. This time:

  1. hicpp-use-equals-default recommends = default instead of {} for constructors/destructors. This is better practice because it expresses the intent better (https://stackoverflow.com/questions/6502828/what-does-default-mean-after-a-class-function-declaration)
  2. readability-inconsistent-declaration-parameter-name enforces that parameter names in the declaration match parameter names in the definition. This is just generally useful and can prevent confusion and bugs.

Also updated my script a little bit.

@apaszke @ezyang

@goldsborough

Copy link
Copy Markdown
Contributor Author

@pytorchbot retest this please

2 similar comments
@goldsborough

Copy link
Copy Markdown
Contributor Author

@pytorchbot retest this please

@yf225

yf225 commented Jul 24, 2018

Copy link
Copy Markdown
Contributor

@pytorchbot retest this please

@goldsborough

Copy link
Copy Markdown
Contributor Author

stamptopia

@ezyang

ezyang commented Jul 25, 2018

Copy link
Copy Markdown
Contributor

@pytorchbot retest this please

Export compile_commands.json
@goldsborough

Copy link
Copy Markdown
Contributor Author

@ezyang are we ok to merge this once tests pass?

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

goldsborough has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@goldsborough
goldsborough deleted the clang-tidy-fixes branch July 30, 2018 21:14
jramseyer pushed a commit to jramseyer/pytorch that referenced this pull request Jul 31, 2018
Summary:
More clang tidy cleanups in `torch/csrc`. This time:

1. `hicpp-use-equals-default` recommends `= default` instead of `{}` for constructors/destructors. This is better practice because it expresses the intent better (https://stackoverflow.com/questions/6502828/what-does-default-mean-after-a-class-function-declaration)
2. `readability-inconsistent-declaration-parameter-name` enforces that parameter names in the declaration match parameter names in the definition. This is just generally useful and can prevent confusion and bugs.

Also updated my script a little bit.

apaszke ezyang
Pull Request resolved: pytorch#9737

Differential Revision: D9069069

Pulled By: goldsborough

fbshipit-source-id: f7b3f3a4eb4c9fadc30425a153566d3b613a41ae
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
More clang tidy cleanups in `torch/csrc`. This time:

1. `hicpp-use-equals-default` recommends `= default` instead of `{}` for constructors/destructors. This is better practice because it expresses the intent better (https://stackoverflow.com/questions/6502828/what-does-default-mean-after-a-class-function-declaration)
2. `readability-inconsistent-declaration-parameter-name` enforces that parameter names in the declaration match parameter names in the definition. This is just generally useful and can prevent confusion and bugs.

Also updated my script a little bit.

apaszke ezyang
Pull Request resolved: pytorch#9737

Differential Revision: D9069069

Pulled By: goldsborough

fbshipit-source-id: f7b3f3a4eb4c9fadc30425a153566d3b613a41ae
@ezyang ezyang added the merged label Jun 26, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
More clang tidy cleanups in `torch/csrc`. This time:

1. `hicpp-use-equals-default` recommends `= default` instead of `{}` for constructors/destructors. This is better practice because it expresses the intent better (https://stackoverflow.com/questions/6502828/what-does-default-mean-after-a-class-function-declaration)
2. `readability-inconsistent-declaration-parameter-name` enforces that parameter names in the declaration match parameter names in the definition. This is just generally useful and can prevent confusion and bugs.

Also updated my script a little bit.

apaszke ezyang
Pull Request resolved: pytorch#9737

Differential Revision: D9069069

Pulled By: goldsborough

fbshipit-source-id: f7b3f3a4eb4c9fadc30425a153566d3b613a41ae
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.

4 participants