[PATCH] D15784: Enable 2 warnings on MSVC, turn on StringPooling & intrinsic functions

Alexander Riccio via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 2 19:16:28 PST 2016


ariccio updated this revision to Diff 43851.
ariccio added a comment.

Killed /GF.


http://reviews.llvm.org/D15784

Files:
  cmake/modules/HandleLLVMOptions.cmake

Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -363,6 +363,17 @@
 
   append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
 
+  # Disable string literal const->non-const type conversion
+  # "When specified, the compiler requires strict const-qualification
+  # conformance for pointers initialized by using string literals."
+  append("/Zc:strictStrings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+  # Generate Intrinsic Functions
+  append("/Oi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+  # Enforce type conversion rules
+  append("/Zc:rvalueCast" CMAKE_CXX_FLAGS)
+
   # Disable sized deallocation if the flag is supported. MSVC fails to compile
   # the operator new overload in User otherwise.
   check_c_compiler_flag("/WX /Zc:sizedDealloc-" SUPPORTS_SIZED_DEALLOC)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15784.43851.patch
Type: text/x-patch
Size: 907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160103/17f73216/attachment.bin>


More information about the llvm-commits mailing list