Skip to content

Commit af2f831

Browse files
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 f3447df commit af2f831

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

766766
# Enable warnings
767767
if (LLVM_ENABLE_WARNINGS)
768+
# Remove all -wd flag to enable warnings
769+
if (NOT CLANG_CL)
770+
set(msvc_warning_flags
771+
# Promoted warnings.
772+
-w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
773+
774+
# Promoted warnings to errors.
775+
-we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error.
776+
)
777+
endif(NOT CLANG_CL)
768778
# Put /W4 in front of all the -we flags. cl.exe doesn't care, but for
769779
# clang-cl having /W4 after the -we flags will re-enable the warnings
770780
# disabled by -we.

0 commit comments

Comments
 (0)