diff --git a/.clang-tidy b/.clang-tidy index 1abd49de546a..ae6fb3e30e36 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -53,6 +53,7 @@ modernize-*, performance-*, readability-container-size-empty, readability-delete-null-pointer, +readability-duplicate-include readability-string-compare, ' HeaderFilterRegex: '^(aten/|c10/|torch/).*$' diff --git a/aten/src/ATen/core/interned_strings.cpp b/aten/src/ATen/core/interned_strings.cpp index 93239a9507c9..177ab51fffbb 100644 --- a/aten/src/ATen/core/interned_strings.cpp +++ b/aten/src/ATen/core/interned_strings.cpp @@ -9,7 +9,6 @@ #include #include #include -#include namespace c10 { diff --git a/torch/csrc/Dtype.cpp b/torch/csrc/Dtype.cpp index d8110c5eafe8..8eee2a02faec 100644 --- a/torch/csrc/Dtype.cpp +++ b/torch/csrc/Dtype.cpp @@ -11,8 +11,6 @@ #include #include -#include - PyObject* THPDtype_New(at::ScalarType scalar_type, const std::string& name) { HANDLE_TH_ERRORS AT_ASSERT(name.length() < DTYPE_NAME_LEN); diff --git a/torch/csrc/Module.cpp b/torch/csrc/Module.cpp index bd69351bc16b..b738e64619ab 100644 --- a/torch/csrc/Module.cpp +++ b/torch/csrc/Module.cpp @@ -87,7 +87,6 @@ #include #include -#include #include #include #ifdef USE_CUDA diff --git a/torch/csrc/Size.cpp b/torch/csrc/Size.cpp index a13d512e4013..0e739c7f6a32 100644 --- a/torch/csrc/Size.cpp +++ b/torch/csrc/Size.cpp @@ -12,7 +12,6 @@ #include #include -#include struct THPSize { PyTupleObject tuple; diff --git a/torch/csrc/utils/python_dispatch.cpp b/torch/csrc/utils/python_dispatch.cpp index c887c822334b..3908bbe15825 100644 --- a/torch/csrc/utils/python_dispatch.cpp +++ b/torch/csrc/utils/python_dispatch.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include