-Werror and lldb

So for fun a bit ago I decided to see what it would take to build lldb -Werror free as a subproject of llvm (in llvm/tools alongside clang of course) and fixed up a bunch of warnings/errors that happen.

lldb-mi has the last set of warnings that I wasn’t able to trivially fix up as it would require rewriting a bit of it so I’ll just send mail to the authors and hope it happens :slight_smile:

Here’s the current problem:

/usr/local/google/home/echristo/sources/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.h:120:16: error: ‘CMIUtilVariant::CDataObject::Copy’ hides overloaded virtual
function [-Werror,-Woverloaded-virtual]
virtual void Copy( const CDataObject & vrOther );
^
/usr/local/google/home/echristo/sources/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.h:266:22: note: in instantiation of template class ‘CMIUtilVariant::CDataObject’
requested here
m_pDataObject = new CDataObject< T >( vArg );
^
/usr/local/google/home/echristo/sources/llvm/tools/lldb/tools/lldb-mi/MIUtilMapIdToVariant.h:99:8: note: in instantiation of function template specialization
‘CMIUtilVariant::Set’ requested here
data.Set< T >( vData );
^
/usr/local/google/home/echristo/sources/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h:205:28: note: in instantiation of function template specialization
‘CMIUtilMapIdToVariant::Add’ requested here
if( !m_mapIdToSessionData.Add< T >( vKey, vData ) )
^
/usr/local/google/home/echristo/sources/llvm/tools/lldb/tools/lldb-mi/MICmdCmdEnviro.cpp:93:32: note: in instantiation of function template specialization
‘CMICmnLLDBDebugSessionInfo::SharedDataAdd’ requested here
if( !m_rLLDBDebugSessionInfo.SharedDataAdd< CMIUtilString >( rStrKeyWkDir, strWkDir ) )
^
/usr/local/google/home/echristo/sources/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.h:85:16: note: hidden overloaded virtual function ‘CMIUtilVariant::CDataObjectBase::Copy’ declared
here: type mismatch at 1st parameter (‘const CMIUtilVariant::CDataObjectBase &’ vs ‘const CMIUtilVariant::CDataObject &’)
virtual void Copy( const CDataObjectBase & vrOther );

which requires a bit of rewriting to get past. It would be very nice if this were to happen since it would allow lldb to take advantage of the newer warnings etc while being able to be built as part of the build bots a little easier as well.

Thanks!

-eric

Hey Eric - thanks for the heads up. I’ll look into getting this sorted :slight_smile:

Cheers,
Colin

Cool deal. Appreciated. :slight_smile:

-eric

Hi guys,

I’ve gone ahead and committed 221315 which disables lldb-mi if Werror is specified in the makefile build as it doesn’t build and it’s been a couple of months.

Thanks.

-eric