forked from OSchip/llvm-project
[cmake] Enable -Wmisleading-indentation
Enable `-Wmisleading-indentation` to balance with the LLVM style of optional parentheses. Differential Revision: https://reviews.llvm.org/D102092
This commit is contained in:
parent
bcfa7baec8
commit
f44c6f20f5
|
@ -759,6 +759,9 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
|
|||
|
||||
# Enable -Wstring-conversion to catch misuse of string literals.
|
||||
add_flag_if_supported("-Wstring-conversion" STRING_CONVERSION_FLAG)
|
||||
|
||||
# Prevent bugs that can happen with llvm's brace style.
|
||||
add_flag_if_supported("-Wmisleading-indentation" MISLEADING_INDENTATION_FLAG)
|
||||
endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
|
||||
|
||||
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS)
|
||||
|
|
Loading…
Reference in New Issue