Skip to content

Commit fdda535

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

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
@@ -787,6 +787,16 @@ if (MSVC)
787787

788788
# Enable warnings
789789
if (LLVM_ENABLE_WARNINGS)
790+
# Remove all -wd flag to enable warnings
791+
if (NOT CLANG_CL)
792+
set(msvc_warning_flags
793+
# Promoted warnings.
794+
-w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
795+
796+
# Promoted warnings to errors.
797+
-we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error.
798+
)
799+
endif(NOT CLANG_CL)
790800
# Put /W4 in front of all the -we flags. cl.exe doesn't care, but for
791801
# clang-cl having /W4 after the -we flags will re-enable the warnings
792802
# disabled by -we.

0 commit comments

Comments
 (0)