This is an archive of the discontinued LLVM Phabricator instance.

C++11 test cleanup: nonthrowing destructors
ClosedPublic

Authored by probinson on Dec 19 2016, 12:57 PM.

Details

Summary

If a dtor has no interesting members, then it ends up being nothrow, which affects the generated IR.
Modify some tests to tolerate this difference between C++03 and C++11.

In C++11, a destructor without an explicit exception-spec gets an implicit exception-spec.
If the dtor has a body, the implicit exception-spec permits throwing exactly the set of types thrown by anything the dtor calls. If the dtor doesn't have a body, use what would be the default dtor's body to determine the implicit exception-spec. If there are no calls, the implicit exception-spec is nothrow.

Diff Detail

Repository
rL LLVM

Event Timeline

probinson updated this revision to Diff 81982.Dec 19 2016, 12:57 PM
probinson retitled this revision from to C++11 test cleanup: nonthrowing destructors.
probinson updated this object.
probinson added a reviewer: rsmith.
probinson added a subscriber: cfe-commits.

+rjmccall as IR Gen owner.

rjmccall accepted this revision.Dec 20 2016, 2:11 PM
rjmccall edited edge metadata.

Nicely done.

This revision is now accepted and ready to land.Dec 20 2016, 2:11 PM
This revision was automatically updated to reflect the committed changes.