[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:
Dave Lee 2021-05-07 14:16:47 -07:00
parent bcfa7baec8
commit f44c6f20f5
1 changed files with 3 additions and 0 deletions

View File

@ -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)