[libcxx-commits] [PATCH] D90536: [libcxx/test] Fix UB when deleting D through a pointer to B.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 4 14:35:03 PST 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG418de7d5d84a: Fix UB in one libcxx test, when deleting D through a pointer to B. (authored by arthur.j.odwyer).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90536/new/

https://reviews.llvm.org/D90536

Files:
  libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp


Index: libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp
===================================================================
--- libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp
+++ libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp
@@ -51,7 +51,7 @@
     Y2& operator=(const int&) { return *this; }
 };
 
-class B {};
+struct B { virtual ~B() = default; };
 class D : public B {};
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90536.302976.patch
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201104/5705fff9/attachment.bin>


More information about the libcxx-commits mailing list