Skip to content

Conversation

@goldsborough
Copy link
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
Contributor Author

@pytorchbot retest this please

2 similar comments
@goldsborough
Copy link
Contributor Author

@pytorchbot retest this please

@yf225
Copy link
Contributor

yf225 commented Jul 24, 2018

@pytorchbot retest this please

@goldsborough
Copy link
Contributor Author

stamptopia

@ezyang
Copy link
Contributor

ezyang commented Jul 25, 2018

@pytorchbot retest this please

Export compile_commands.json
@goldsborough
Copy link
Contributor Author

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

Copy link
Contributor

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

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
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