[Lldb-commits] [PATCH] D102092: [lldb] Enable -Wmisleading-indentation

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 7 15:42:17 PDT 2021


kastiglione updated this revision to Diff 343773.
kastiglione added a comment.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Enable for llvm.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102092/new/

https://reviews.llvm.org/D102092

Files:
  llvm/cmake/modules/HandleLLVMOptions.cmake


Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -759,6 +759,9 @@
 
   # 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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102092.343773.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210507/899e46c1/attachment.bin>


More information about the lldb-commits mailing list