1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 17:44:56 +09:00

AK: Silence -Wfree-nonheap-object more generally in Function for gcc

We were already silencing it at the site of the delete call, but gcc in
distribution mode is more aggressive about inlining and still sees a
delete that it doesn't like.
This commit is contained in:
Andrew Kaster 2025-05-13 03:21:23 -06:00 committed by Andrew Kaster
parent 89e0896cd7
commit 905c5ecb4c
Notes: github-actions[bot] 2025-05-14 08:03:06 +00:00

View file

@ -296,7 +296,8 @@ private:
break;
case FunctionKind::Outline:
VERIFY(wrapper);
wrapper->destroy();
// This code is a bit too clever for gcc. Pinky promise we're only deleting heap objects.
AK_IGNORE_DIAGNOSTIC("-Wfree-nonheap-object", wrapper->destroy());
break;
case FunctionKind::Block:
VERIFY(wrapper);