[PATCH] D27936: C++11 test cleanup: nonthrowing destructors

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 12:57:23 PST 2016


probinson created this revision.
probinson added a reviewer: rsmith.
probinson added a subscriber: cfe-commits.

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.


https://reviews.llvm.org/D27936

Files:
  test/CodeGenCXX/destructors.cpp
  test/CodeGenCXX/nrvo.cpp
  test/CodeGenCXX/partial-destruction.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27936.81982.patch
Type: text/x-patch
Size: 18549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161219/a1e3d41f/attachment-0001.bin>


More information about the cfe-commits mailing list