diff options
author | Peter Goldsborough <psag@fb.com> | 2018-07-30 13:57:19 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-07-30 14:10:00 -0700 |
commit | 04939a47454727a212a7b8d61043a104616601a8 (patch) | |
tree | 1780fcb36540f67fa768c854941222c26d9d0ed2 /.clang-tidy | |
parent | 40a82399847f84afc4011592e728f6bd4f9a314d (diff) | |
download | pytorch-04939a47454727a212a7b8d61043a104616601a8.tar.gz pytorch-04939a47454727a212a7b8d61043a104616601a8.tar.bz2 pytorch-04939a47454727a212a7b8d61043a104616601a8.zip |
Match parameter names and = default (#9737)
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: https://github.com/pytorch/pytorch/pull/9737
Differential Revision: D9069069
Pulled By: goldsborough
fbshipit-source-id: f7b3f3a4eb4c9fadc30425a153566d3b613a41ae
Diffstat (limited to '.clang-tidy')
-rw-r--r-- | .clang-tidy | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.clang-tidy b/.clang-tidy index 5466a4a31d..d5fc66c26d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -2,6 +2,7 @@ # NOTE: there must be no spaces before the '-', so put the comma first. Checks: ' * + ,clang-analyzer-* ,modernize-* ,-cert-err58-cpp ,-cert-err60-cpp @@ -9,6 +10,7 @@ Checks: ' ,-cppcoreguidelines-owning-memory ,-cppcoreguidelines-pro-bounds-array-to-pointer-decay ,-cppcoreguidelines-pro-bounds-constant-array-index + ,-cppcoreguidelines-pro-type-member-init ,-cppcoreguidelines-pro-type-static-cast-downcast ,-cppcoreguidelines-pro-type-vararg ,-cppcoreguidelines-special-member-functions @@ -23,9 +25,11 @@ Checks: ' ,-hicpp-braces-around-statements ,-hicpp-explicit-conversions ,-hicpp-no-array-decay + ,-hicpp-signed-bitwise ,-hicpp-special-member-functions ,-hicpp-vararg ,-llvm-header-guard + ,-llvm-include-order ,-llvm-namespace-comment ,-misc-unused-parameters ,-modernize-make-unique @@ -34,7 +38,6 @@ Checks: ' ,-readability-braces-around-statements ,-readability-else-after-return ,-readability-named-parameter - ,clang-analyzer-* ' WarningsAsErrors: '' HeaderFilterRegex: 'torch/csrc/' |