<div dir="ltr">Looks reasonable, please commit.<br><br>(seems cast-qual is specified in Clang's cmake (tools/cmake/CMakeLists.txt) - once you've added this to LLVM, should it be removed from Clang? (does it trickle down?))</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 11, 2014 at 1:48 PM, Roman Divacky <span dir="ltr"><<a href="mailto:rdivacky@vlakno.cz" target="_blank">rdivacky@vlakno.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
The inline patch enables -Wcast-qual in cmake builds. The warning<br>
is already enabled for autoconf builds. Note that clang doesnt<br>
yet support that warning. I posted a patch to implement that<br>
warning. LLVM+clang+lld build is -Wcast-qual safe.<br>
<br>
Ok to commit?<br>
<br>
Index: cmake/modules/HandleLLVMOptions.cmake<br>
===================================================================<br>
--- cmake/modules/HandleLLVMOptions.cmake       (revision 221712)<br>
+++ cmake/modules/HandleLLVMOptions.cmake       (working copy)<br>
@@ -276,6 +276,7 @@<br>
 elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )<br>
   if (LLVM_ENABLE_WARNINGS)<br>
     append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)<br>
+    append("-Wcast-qual" CMAKE_CXX_FLAGS)<br>
<br>
     # Turn off missing field initializer warnings for gcc to avoid noise from<br>
     # false positives with empty {}. Turn them on otherwise (they're off by<br>
<br>
<br>
Roman<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>