Skip to content

Commit

Permalink
[Easy][BE]: Enable clang-tidy check for duplicate includes (pytorch#1…
Browse files Browse the repository at this point in the history
…16193)

Adds a clang-tidy check to flag duplicate include files
Pull Request resolved: pytorch#116193
Approved by: https://github.com/albanD, https://github.com/malfet
  • Loading branch information
Skylion007 authored and pytorchmergebot committed Dec 21, 2023
1 parent 2dce364 commit cc2c2c6
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ modernize-*,
performance-*,
readability-container-size-empty,
readability-delete-null-pointer,
readability-duplicate-include
readability-string-compare,
'
HeaderFilterRegex: '^(aten/|c10/|torch/).*$'
Expand Down
1 change: 0 additions & 1 deletion aten/src/ATen/core/interned_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <string>
#include <c10/util/Exception.h>
#include <ATen/core/interned_strings_class.h>
#include <c10/util/Exception.h>

namespace c10 {

Expand Down
2 changes: 0 additions & 2 deletions torch/csrc/Dtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <torch/csrc/utils/tensor_types.h>
#include <cstring>

#include <torch/csrc/Exceptions.h>

PyObject* THPDtype_New(at::ScalarType scalar_type, const std::string& name) {
HANDLE_TH_ERRORS
AT_ASSERT(name.length() < DTYPE_NAME_LEN);
Expand Down
1 change: 0 additions & 1 deletion torch/csrc/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
#include <torch/csrc/utils/verbose.h>

#include <ATen/native/transformers/sdp_utils_cpp.h>
#include <c10/util/Logging.h>
#include <torch/csrc/profiler/combined_traceback.h>
#include <sstream>
#ifdef USE_CUDA
Expand Down
1 change: 0 additions & 1 deletion torch/csrc/Size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include <torch/csrc/autograd/python_variable.h>
#include <torch/csrc/jit/frontend/tracer.h>
#include <torch/csrc/utils/pybind.h>

struct THPSize {
PyTupleObject tuple;
Expand Down
1 change: 0 additions & 1 deletion torch/csrc/utils/python_dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <c10/util/flat_hash_map.h>
#include <pybind11/operators.h>
#include <pybind11/stl.h>
#include <torch/csrc/jit/python/pybind_utils.h>
#include <torch/csrc/utils/pybind.h>
#include <torch/csrc/utils/python_raii.h>

Expand Down

0 comments on commit cc2c2c6

Please sign in to comment.