mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
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:
parent
ab07d8bbf0
commit
1f68b1f768
Notes:
sideshowbarker
2024-07-18 05:05:27 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/1f68b1f7682 Pull-request: https://github.com/SerenityOS/serenity/pull/9681 Reviewed-by: https://github.com/ADKaster
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue