This is obviously a false positive (GCC does not understand leakRef), so we'll need to suppress it either individually or project-wide. For now I think only TimingFunction.h is a problem so individual suppressions will suffice. /builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h: In static member function 'static const WebCore::LinearTimingFunction& WebCore::LinearTimingFunction::sharedLinearTimingFunction()': /builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:75:44: warning: possibly dangling reference to a temporary [-Wdangling-reference] 75 | static const LinearTimingFunction& function = create().leakRef(); | ^~~~~~~~ /builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:75:71: note: the temporary was destroyed at the end of the full expression 'WebCore::LinearTimingFunction::create()().WTF::Ref<WebCore::LinearTimingFunction>::leakRef()' 75 | static const LinearTimingFunction& function = create().leakRef(); | ~~~~~~~~~~~~~~~~^~ /builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h: In static member function 'static const WebCore::CubicBezierTimingFunction& WebCore::CubicBezierTimingFunction::defaultTimingFunction()': /builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:141:49: warning: possibly dangling reference to a temporary [-Wdangling-reference] 141 | static const CubicBezierTimingFunction& function = create().leakRef(); | ^~~~~~~~ /builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:141:76: note: the temporary was destroyed at the end of the full expression 'WebCore::CubicBezierTimingFunction::create()().WTF::Ref<WebCore::CubicBezierTimingFunction>::leakRef()' 141 | static const CubicBezierTimingFunction& function = create().leakRef();
<rdar://problem/106034923>