summaryrefslogtreecommitdiff
path: root/.clang-tidy
diff options
context:
space:
mode:
authorPeter Goldsborough <psag@fb.com>2018-11-02 20:24:35 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-11-02 20:30:40 -0700
commit0479517325a79b22d9eeb2de612d7e09a6ea4bad (patch)
tree7e2d1af7930818cad5a611503019c83a53bc89e4 /.clang-tidy
parent4bca51e3e7dc83c424ce85f68feb32a6bf3ee463 (diff)
downloadpytorch-0479517325a79b22d9eeb2de612d7e09a6ea4bad.tar.gz
pytorch-0479517325a79b22d9eeb2de612d7e09a6ea4bad.tar.bz2
pytorch-0479517325a79b22d9eeb2de612d7e09a6ea4bad.zip
Add modernize-* checks to clang-tidy (#13196)
Summary: Enables almost all `modernize-*` checks in clang-tidy. This warns against things such as: - Use of `const std::string&` instead of new-style `std::string` + move, - Using old-style loops instead of range-for loops, - Use of raw `new` - Use of `push_back` instead of `emplace_back` - Use of `virtual` together with `override` (`override` is sufficient) ezyang Pull Request resolved: https://github.com/pytorch/pytorch/pull/13196 Differential Revision: D12891837 Pulled By: goldsborough fbshipit-source-id: 4d0f782a09eb391ee718d3d66f74c095ee121c09
Diffstat (limited to '.clang-tidy')
-rw-r--r--.clang-tidy5
1 files changed, 4 insertions, 1 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 5e1a1f4cb3..8f0dba7eaf 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -2,7 +2,6 @@
# NOTE there must be no spaces before the '-', so put the comma first.
Checks: '
-*
- ,modernize-deprecated-headers
,bugprone-*
,-bugprone-macro-parentheses
,-bugprone-forward-declaration-namespace
@@ -18,6 +17,10 @@ Checks: '
,hicpp-signed-bitwise
,hicpp-exception-baseclass
,hicpp-avoid-goto
+ ,modernize-*
+ ,-modernize-use-default-member-init
+ ,-modernize-return-braced-init-list
+ ,-modernize-use-auto
'
WarningsAsErrors: '*'
HeaderFilterRegex: 'torch/csrc/.*'