New Defects reported by Coverity Scan for LibreOffice

Caolán McNamara caolanm at redhat.com
Mon Jan 23 21:37:39 UTC 2017


On Mon, 2017-01-23 at 11:40 +0100, Stephan Bergmann wrote:
> I don't think adding noexcept(false) to such dtors would be
> good. They are surely not meant to throw.

Well, take 1399220 as a common enough pattern, an OUString +=
"something" and OUString::operator+= calls rtl_uString_newConcatAsciiL
and that has a throw std::length_error. If it makes sense to claim this
dtor won't throw cause that's just not going to happen in the real
world, then it might make as much sense to remove the throw from +=
instead.

Anyhow, if any member of a class or base-class has a dtor thats
nothrow(false) that'll poison the whole hierarchy so they are
implicitly nothrow(false) too, right ? So, in your dynamic exception
specification changes mail you mentioned "For dtors, the dynamic 
exception specification would be replaced with an explicit 
nothrow(false)." so it might end up that lots of these warning melt
away again if that affects something sufficiently lowlevel ? Maybe
worry about these again after those changes land.

C.


More information about the LibreOffice mailing list