AK: Add operator delete stub to all AK_MAKE_ETERNAL objects

Static analysis correctly flags that we are missing an implementation
for `operator delete` for all classes which are annotated with
AK_MAKE_ETERNAL. To appease static analysis define an implementation
which asserts to make sure no one ever calls delete on the object.
This commit is contained in:
Brian Gianforcaro 2021-08-30 00:55:24 -07:00 committed by Andreas Kling
parent ab07d8bbf0
commit 1f68b1f768

View file

@ -42,6 +42,7 @@ inline size_t malloc_good_size(size_t size) { return size; }
# define AK_MAKE_ETERNAL \
public: \
void* operator new(size_t size) { return kmalloc_eternal(size); } \
void operator delete(void*, size_t) { VERIFY_NOT_REACHED(); } \
\
private:
#else