mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Adding Wunused-local-typedef build flag (#86154)
# Summary In the past, we have seen PRs causing internal breakages caused by `-Wunused-local-typedef` flag which than had to be fixed. For example: [#79978](https://github.com/pytorch/pytorch/pull/79978) As part of this change, we want to catch this error in the PR Checks itself. Pull Request resolved: https://github.com/pytorch/pytorch/pull/86154 Approved by: https://github.com/huydhn, https://github.com/seemethere, https://github.com/osalpekar
This commit is contained in:
parent
8da704cdb7
commit
d724a91935
|
|
@ -832,6 +832,7 @@ if(NOT MSVC)
|
||||||
append_cxx_flag_if_supported("-Wno-type-limits" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-type-limits" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-array-bounds" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-array-bounds" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
|
||||||
|
append_cxx_flag_if_supported("-Wunused-local-typedefs" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-unused-parameter" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-unused-parameter" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-unused-function" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-unused-function" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-unused-result" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-unused-result" CMAKE_CXX_FLAGS)
|
||||||
|
|
@ -895,6 +896,7 @@ if(NOT MSVC)
|
||||||
append_cxx_flag_if_supported("-Wno-constexpr-not-const" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-constexpr-not-const" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-missing-braces" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-missing-braces" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wunused-lambda-capture" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wunused-lambda-capture" CMAKE_CXX_FLAGS)
|
||||||
|
append_cxx_flag_if_supported("-Wunused-local-typedef" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Qunused-arguments" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Qunused-arguments" CMAKE_CXX_FLAGS)
|
||||||
if(${USE_COLORIZE_OUTPUT})
|
if(${USE_COLORIZE_OUTPUT})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
1
defs.bzl
1
defs.bzl
|
|
@ -15,7 +15,6 @@ default_compiler_flags = [
|
||||||
"-Wno-unused-function",
|
"-Wno-unused-function",
|
||||||
"-Wno-unused-parameter",
|
"-Wno-unused-parameter",
|
||||||
"-Wno-error=strict-aliasing",
|
"-Wno-error=strict-aliasing",
|
||||||
"-Wno-unused-local-typedefs",
|
|
||||||
"-Wno-shadow-compatible-local",
|
"-Wno-shadow-compatible-local",
|
||||||
"-Wno-maybe-uninitialized", # aten is built with gcc as part of HHVM
|
"-Wno-maybe-uninitialized", # aten is built with gcc as part of HHVM
|
||||||
"-Wno-unknown-pragmas",
|
"-Wno-unknown-pragmas",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user