[PATCH]: enable -Wcast-qual in cmake builds
Roman Divacky
rdivacky at vlakno.cz
Thu Nov 13 11:38:30 PST 2014
Ok, thanks. I'll test the removal from tools/cmake/CMakeLists.txt and remove
it if it's propagated.
On Thu, Nov 13, 2014 at 11:37:19AM -0800, David Blaikie wrote:
> 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
> >
More information about the llvm-commits
mailing list