[Lldb-commits] [PATCH] D102092: [lldb] Enable -Wmisleading-indentation
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri May 7 14:22:39 PDT 2021
kastiglione created this revision.
kastiglione added reviewers: JDevlieghere, aprantl, jasonmolenda.
Herald added a subscriber: mgorny.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Enable `-Wmisleading-indentation` to balance with the LLVM style of optional parentheses.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102092
Files:
lldb/cmake/modules/LLDBConfig.cmake
Index: lldb/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -158,6 +158,12 @@
endif ()
include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
+# Prevent bugs via useful warnings.
+if (LLVM_ENABLE_WARNINGS)
+ check_cxx_compiler_flag("-Wmisleading-indentation" CXX_SUPPORTS_MISLEADING_INDENTATION)
+ append_if(CXX_SUPPORTS_MISLEADING_INDENTATION "-Wmisleading-indentation" CMAKE_CXX_FLAGS)
+endif()
+
# Disable GCC warnings
check_cxx_compiler_flag("-Wno-deprecated-declarations" CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS)
append_if(CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS "-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102092.343761.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210507/c0f5bde8/attachment.bin>
More information about the lldb-commits
mailing list