#ifndef _LILAC_MEM_H_ #define _LILAC_MEM_H_ // This is for clang borrow checking rules // https://clang.llvm.org/docs/AttributeReference.html#ownership-holds-ownership-returns-ownership-takes-clang-static-analyzer /// Creates the object with the specified allocator // hopefully this is valid there are no tests yet #define creates(allocator) [[clang::ownership_returns(allocator) allocating]] /// Takes ownership of the object #define holds(allocator, idx) [[clang::ownership_takes(allocator, idx)]] /// Frees the Memory of the object #define destroys(allocator) [[clang::ownership_takes(allocator, 1)]] #endif