[llvm] r216170 - Make format_object_base's destructor protected and non-virtual.

Owen Anderson resistor at mac.com
Fri Aug 22 11:21:33 PDT 2014


> On Aug 22, 2014, at 11:17 AM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> On Fri, Aug 22, 2014 at 11:11 AM, Owen Anderson <resistor at mac.com> wrote:
>> 
>>> On Aug 22, 2014, at 11:02 AM, David Blaikie <dblaikie at gmail.com> wrote:
>>> 
>>> You can disable the warning - as with bad MSVC/GCC warnings, we
>>> usually rely on buildbots/other developers to catch the bugs that slip
>>> through from users on compilers with buggy diagnostics.
>> 
>> Actually, you can’t.  The CMake build system forcibly enables -Wnon-virtual-dtor.
> 
> Do we have an argument ordering problem? I'd imagine the CMake
> defaults should go before any custom C/CXX FLAGS the user specifies,
> thus allowing the user to override them.

Looks like it.  Here’s the compiler invocations I’m seeing from ninja when I put -Wno-non-virtual-dtor in my CXXFLAGS.

/usr/bin/c++   -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DGTEST_HAS_RTTI=0 -Wno-non-virtual-dtor -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -O3  -Ilib/Support -I/Users/resistor/llvm/src/llvm/lib/Support -Iinclude -I/Users/resistor/llvm/src/llvm/include    -UNDEBUG -fno-exceptions -fno-rtti -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Watchdog.cpp.o -MF "lib/Support/CMakeFiles/LLVMSupport.dir/Watchdog.cpp.o.d" -o lib/Support/CMakeFiles/LLVMSupport.dir/Watchdog.cpp.o -c /Users/resistor/llvm/src/llvm/lib/Support/Watchdog.cpp


—Owen



More information about the llvm-commits mailing list