Skip to content

Commit 477e0f4

Browse files
ShaojieZhuIntelermilindwalekar
authored andcommitted
EISW-130780: remove all wd flag to enable warnings when LLVM_ENABLE_WARNINGS is ON (llvm#99)
Signed-off-by: Zhu, Shaojie <[email protected]>
1 parent 209c2c5 commit 477e0f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,16 @@ if (MSVC)
797797

798798
# Enable warnings
799799
if (LLVM_ENABLE_WARNINGS)
800+
# Remove all -wd flag to enable warnings
801+
if (NOT CLANG_CL)
802+
set(msvc_warning_flags
803+
# Promoted warnings.
804+
-w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
805+
806+
# Promoted warnings to errors.
807+
-we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error.
808+
)
809+
endif(NOT CLANG_CL)
800810
# Put /W4 in front of all the -we flags. cl.exe doesn't care, but for
801811
# clang-cl having /W4 after the -we flags will re-enable the warnings
802812
# disabled by -we.

0 commit comments

Comments
 (0)