[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 21 14:07:54 PDT 2018


vsapsai updated this revision to Diff 139369.
vsapsai edited the summary of this revision.
vsapsai added a comment.

- Implement the same functionality for C++98 and C++03.
- Use `DoNotOptimize` instead of `asm`.

Didn't move the tests as the standard doesn't require assignment operator to be
reentrant and we implement that not in general case but only for assigning
`nullptr`. Tests might be still worth moving, just previous arguments don't
apply anymore, as for me.


https://reviews.llvm.org/D34331

Files:
  libcxx/include/__functional_03
  libcxx/include/functional
  libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp
  libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34331.139369.patch
Type: text/x-patch
Size: 6512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180321/884ed9bd/attachment.bin>


More information about the cfe-commits mailing list