diff options
author | Peter Goldsborough <psag@fb.com> | 2018-07-11 12:02:17 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-07-11 12:10:30 -0700 |
commit | 18a975210d1190b109d7e5fa80546b9518c63e9a (patch) | |
tree | 95cf105be650d8a3da9bcfff0e4da0f512494e26 /.clang-tidy | |
parent | c2dd90c40ef196e6a40c217016f0e4bf7c1dffbb (diff) | |
download | pytorch-18a975210d1190b109d7e5fa80546b9518c63e9a.tar.gz pytorch-18a975210d1190b109d7e5fa80546b9518c63e9a.tar.bz2 pytorch-18a975210d1190b109d7e5fa80546b9518c63e9a.zip |
Add explicit to conversions (#9336)
Summary:
Another code-mod for clang-tidy: Conversion operators should be marked explicit so that they don't cause unwanted implicit conversions. This is especially important for `operator bool()`, see https://stackoverflow.com/questions/39995573/when-can-i-use-explicit-operator-bool-without-a-cast
ezyang apaszke
Pull Request resolved: https://github.com/pytorch/pytorch/pull/9336
Reviewed By: apaszke
Differential Revision: D8807065
Pulled By: goldsborough
fbshipit-source-id: 0e9f4ebd0048a2a510c0d05fa410695d7e977eb1
Diffstat (limited to '.clang-tidy')
-rw-r--r-- | .clang-tidy | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/.clang-tidy b/.clang-tidy index 377111e41c..5466a4a31d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,36 +3,38 @@ Checks: ' * ,modernize-* - ,clang-analyzer-* + ,-cert-err58-cpp + ,-cert-err60-cpp ,-clang-diagnostic-* - ,-hicpp-no-array-decay + ,-cppcoreguidelines-owning-memory + ,-cppcoreguidelines-pro-bounds-array-to-pointer-decay + ,-cppcoreguidelines-pro-bounds-constant-array-index + ,-cppcoreguidelines-pro-type-static-cast-downcast + ,-cppcoreguidelines-pro-type-vararg + ,-cppcoreguidelines-special-member-functions ,-fuchsia-* + ,-google-build-using-namespace + ,-google-explicit-constructor + ,-google-readability-braces-around-statements ,-google-readability-namespace-comments - ,-llvm-namespace-comment ,-google-readability-todo - ,-cppcoreguidelines-pro-bounds-array-to-pointer-decay - ,-cert-err60-cpp - ,-llvm-header-guard - ,-cppcoreguidelines-special-member-functions - ,-misc-unused-parameters + ,-google-runtime-references + ,-google-runtime-references ,-hicpp-braces-around-statements + ,-hicpp-explicit-conversions + ,-hicpp-no-array-decay ,-hicpp-special-member-functions - ,-readability-braces-around-statements - ,-modernize-use-default-member-init - ,-google-runtime-references - ,-cppcoreguidelines-pro-type-vararg - ,-google-readability-braces-around-statements - ,-google-build-using-namespace ,-hicpp-vararg - ,-hicpp-explicit-conversions - ,-performance-unnecessary-value-param - ,-google-runtime-references - ,-cppcoreguidelines-pro-type-static-cast-downcast - ,-cppcoreguidelines-pro-bounds-constant-array-index - ,-cert-err58-cpp + ,-llvm-header-guard + ,-llvm-namespace-comment + ,-misc-unused-parameters ,-modernize-make-unique - ,-cppcoreguidelines-owning-memory + ,-modernize-use-default-member-init + ,-performance-unnecessary-value-param + ,-readability-braces-around-statements + ,-readability-else-after-return ,-readability-named-parameter + ,clang-analyzer-* ' WarningsAsErrors: '' HeaderFilterRegex: 'torch/csrc/' |