| 580 | // TODO: This could do a reinterpret-cast if sizeof(T) === sizeof(void*) |
| 581 | template<typename T> |
| 582 | inline T* getContext(const T& t) { |
| 583 | // not a leak because this is called once per binding |
| 584 | auto* ret = new T(t); |
| 585 | #if __has_feature(leak_sanitizer) || __has_feature(address_sanitizer) |
| 586 | __lsan_ignore_object(ret); |
| 587 | #endif |
| 588 | return ret; |
| 589 | } |
| 590 | |
| 591 | template<typename Func, typename ValueTypeOrSignature> |
| 592 | struct FunctionTag {}; |
no test coverage detected