This is an archive of the discontinued LLVM Phabricator instance.

Suppress -Wdelete-non-virtual-dtor warnings _about_ classes defined in system headers.
ClosedPublic

Authored by thakis on Aug 30 2017, 7:29 PM.

Details

Reviewers
dblaikie
rnk
Summary

r312167 made it so that we emit Wdelete-non-virtual-dtor from delete statements that are in system headers (e.g. std::unique_ptr). That works great on Linux and macOS, but on Windows there are non-final classes that are defined in system headers that have virtual methods but non-virtual destructors and yet get deleted through a base class pointer (e.g. ATL::CAccessToken::CRevert). So paddle back a bit and don't emit the warning if it's about a class defined in a system header.

Diff Detail

Event Timeline

thakis created this revision.Aug 30 2017, 7:29 PM
rnk accepted this revision.Aug 30 2017, 9:48 PM

Lgtm

This revision is now accepted and ready to land.Aug 30 2017, 9:48 PM
thakis closed this revision.Aug 30 2017, 11:18 PM

312216, thanks!