Skip to content

Commit a9b0a92

Browse files
malfetfacebook-github-bot
authored andcommittedJul 23, 2021
Disable avoid-non-const-global-variables lint check (pytorch#62008)
Summary: As GoogleTest `TEST` macro is non-compliant with it as well as `DEFINE_DISPATCH` All changes but the ones to `.clang-tidy` are generated using following script: ``` for i in `find . -type f -iname "*.c*" -or -iname "*.h"|xargs grep cppcoreguidelines-avoid-non-const-global-variables|cut -f1 -d:|sort|uniq`; do sed -i "/\/\/ NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)/d" $i; done ``` Pull Request resolved: pytorch#62008 Reviewed By: driazati, r-barnes Differential Revision: D29838584 Pulled By: malfet fbshipit-source-id: 1b2f8602c945bd4ce50a9bfdd204755556e31d13
1 parent 260198d commit a9b0a92

File tree

1,011 files changed

+1
-7626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,011 files changed

+1
-7626
lines changed
 

‎.clang-tidy-oss

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ bugprone-*,
99
-bugprone-reserved-identifier,
1010
cppcoreguidelines-*,
1111
-cppcoreguidelines-avoid-magic-numbers,
12+
-cppcoreguidelines-avoid-non-const-global-variables,
1213
-cppcoreguidelines-interfaces-global-init,
1314
-cppcoreguidelines-macro-usage,
1415
-cppcoreguidelines-owning-memory,

‎aten/src/ATen/Context.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ Allocator* getCPUAllocator() {
235235
// means the allow_tf32 flags are overrided and tf32 is force disabled
236236
// override_allow_tf32_flag = false
237237
// means the original allow_tf32 flags are followed
238-
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
239238
thread_local bool override_allow_tf32_flag = false;
240239

241240
NoTF32Guard::NoTF32Guard() {

0 commit comments

Comments
 (0)
Please sign in to comment.