From ff4aac109a990e64d82fb73b5af5fa5e69278580 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Thu, 21 Dec 2023 15:09:10 +0000 Subject: [PATCH] [BE][Easy]: Enable clang-tidy check readability-misplaced-array-index (#116210) Enable clang-tidy check readability which checks for a bizarre C++ construct that is usually indicative of an error: https://clang.llvm.org/extra/clang-tidy/checks/readability/misplaced-array-index.html (indexing a number by a pointer, which surprisingly inverts the operands). Pull Request resolved: https://github.com/pytorch/pytorch/pull/116210 Approved by: https://github.com/albanD, https://github.com/malfet --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index ae6fb3e30e36e..7c94507b578d0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -54,6 +54,7 @@ performance-*, readability-container-size-empty, readability-delete-null-pointer, readability-duplicate-include +readability-misplaced-array-index, readability-string-compare, ' HeaderFilterRegex: '^(aten/|c10/|torch/).*$'