Commit 30073fb9 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

check calls for Function exec ops

Summary: Exec ops include move and nuke ops.

Reviewed By: ot, philippv

Differential Revision: D32904615

fbshipit-source-id: cb6ffa81f034c2dd8072ebd605dc8caabac2f199
parent a17e8443
......@@ -20,10 +20,19 @@
#include <cstdarg>
#include <folly/Memory.h>
#include <folly/lang/Keep.h>
#include <folly/portability/GTest.h>
using folly::Function;
extern "C" FOLLY_KEEP void check_folly_function_move(void* src, void* dst) {
new (dst) Function<void()>(std::move(*static_cast<Function<void()>*>(src)));
}
extern "C" FOLLY_KEEP void check_folly_function_nuke(void* fun) {
static_cast<Function<void()>*>(fun)->~Function();
}
namespace {
int func_int_int_add_25(int x) {
return x + 25;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment