[PATCH]: enable -Wcast-qual in cmake builds
David Blaikie
dblaikie at gmail.com
Thu Nov 13 11:37:19 PST 2014
Looks reasonable, please commit.
(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?))
On Tue, Nov 11, 2014 at 1:48 PM, Roman Divacky <rdivacky at vlakno.cz> wrote:
> Hi,
>
> The inline patch enables -Wcast-qual in cmake builds. The warning
> is already enabled for autoconf builds. Note that clang doesnt
> yet support that warning. I posted a patch to implement that
> warning. LLVM+clang+lld build is -Wcast-qual safe.
>
> Ok to commit?
>
> Index: cmake/modules/HandleLLVMOptions.cmake
> ===================================================================
> --- cmake/modules/HandleLLVMOptions.cmake (revision 221712)
> +++ cmake/modules/HandleLLVMOptions.cmake (working copy)
> @@ -276,6 +276,7 @@
> elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
> if (LLVM_ENABLE_WARNINGS)
> append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS
> CMAKE_CXX_FLAGS)
> + append("-Wcast-qual" CMAKE_CXX_FLAGS)
>
> # Turn off missing field initializer warnings for gcc to avoid noise
> from
> # false positives with empty {}. Turn them on otherwise (they're off
> by
>
>
> Roman
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141113/f1468ab4/attachment.html>
More information about the llvm-commits
mailing list