File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -684,8 +684,6 @@ if ( LLVM_COMPILER_IS_GCC_COMPATIBLE AND LLVM_ENABLE_MODULES )
684
684
endif ()
685
685
endif ( LLVM_COMPILER_IS_GCC_COMPATIBLE AND LLVM_ENABLE_MODULES )
686
686
687
- option (LLVM_ENABLE_WARNINGS_FOR_PASS_BINSKIM "Enable compiler warnings for pass binskim." OFF )
688
-
689
687
if (MSVC )
690
688
if (NOT CLANG_CL )
691
689
set (msvc_warning_flags
@@ -748,15 +746,18 @@ if (MSVC)
748
746
)
749
747
endif (NOT CLANG_CL )
750
748
751
- # Remove -wd4146 -wd4244 -wd4267 to pass Binskim
752
- if (LLVM_ENABLE_WARNINGS_FOR_PASS_BINSKIM )
753
- string (REPLACE "-wd4146" "" msvc_warning_flags "${msvc_warning_flags} " )
754
- string (REPLACE "-wd4244" "" msvc_warning_flags "${msvc_warning_flags} " )
755
- string (REPLACE "-wd4267" "" msvc_warning_flags "${msvc_warning_flags} " )
756
- endif ()
757
-
758
749
# Enable warnings
759
750
if (LLVM_ENABLE_WARNINGS )
751
+ # Remove all -wd flag to enable warnings
752
+ if (NOT CLANG_CL )
753
+ set (msvc_warning_flags
754
+ # Promoted warnings.
755
+ -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
756
+
757
+ # Promoted warnings to errors.
758
+ -we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error.
759
+ )
760
+ endif (NOT CLANG_CL )
760
761
# Put /W4 in front of all the -we flags. cl.exe doesn't care, but for
761
762
# clang-cl having /W4 after the -we flags will re-enable the warnings
762
763
# disabled by -we.
You can’t perform that action at this time.
0 commit comments