mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08: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:
committed by
PyTorch MergeBot
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-array-bounds" 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-function" 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-missing-braces" 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)
|
||||
if(${USE_COLORIZE_OUTPUT})
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user