Bug 224452

Summary: Lots of spurious -Wnonnull warnings with GCC 11
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: Web Template FrameworkAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, benjamin, cdumez, cgarcia, cmarcelo, darin, ddkilzer, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, japhet, kangil.han, keith_miller, macpherson, mark.lam, mcatanzaro, menard, msaboff, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer, zilla
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
See Also: https://bugs.webkit.org/show_bug.cgi?id=224838
https://bugs.webkit.org/show_bug.cgi?id=224826
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing none

Description Michael Catanzaro 2021-04-12 14:11:23 PDT
With GCC 11, we have a warning spam coming from RefPtr.h. Let's silence it using IGNORE_WARNING_BEGIN/END:

[1019/5391] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Tests/WTF/HashMap.cpp.o
In file included from WTF/Headers/wtf/HashFunctions.h:26,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/DeletedAddressOfOperator.h:28,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:30:
In static member function ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = TestWebKitAPI::RefLogger]’,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = TestWebKitAPI::RefLogger; _PtrTraits = WTF::RawPtrTraits<TestWebKitAPI::RefLogger>; _RefDerefTraits = WTF::DefaultRefDerefTraits<TestWebKitAPI::RefLogger>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘virtual void TestWebKitAPI::WTF_HashMap_Ref_Value_Test::TestBody()’ at ../../Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:977:36:
WTF/Headers/wtf/RefPtr.h:42:23: warning: ‘this’ pointer is null [-Wnonnull]
   42 |             ptr->deref();
      |             ~~~~~~~~~~^~
In file included from ../../Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:32:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h: In member function ‘virtual void TestWebKitAPI::WTF_HashMap_Ref_Value_Test::TestBody()’:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h:35:10: note: in a call to non-static member function ‘void TestWebKitAPI::RefLogger::deref()’
   35 |     void deref();
      |          ^~~~~

This is surely a GCC bug -- it's a static class function, so there is no 'this' pointer -- and I intend to report it to the GCC developers. But in the meantime, it would be nice to work around this in WebKit because the warning spam makes it hard to notice other warnings.
Comment 1 Michael Catanzaro 2021-04-12 14:38:06 PDT
Well, actually I see the warning is for RefLogger::deref, so 'this' is a RefLogger. But it's still clearly impossible for it to be nonnull since we check for nullptr one line up. The warning actually goes away if we remove the LIKELY().

GCC bug: https://bugzilla.redhat.com/show_bug.cgi?id=1948775
Comment 2 Michael Catanzaro 2021-04-12 14:46:21 PDT
Created attachment 425793 [details]
Patch
Comment 3 Michael Catanzaro 2021-04-12 14:49:41 PDT
Comment on attachment 425793 [details]
Patch

Removing r? until I've fully worked through all the new -Wnonnull warnings. Might turn out to be more practical to just disable it globally.
Comment 4 Michael Catanzaro 2021-04-14 13:51:40 PDT
(In reply to Michael Catanzaro from comment #1)
> GCC bug: https://bugzilla.redhat.com/show_bug.cgi?id=1948775

Upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100086
Comment 5 Michael Catanzaro 2021-04-16 12:47:13 PDT
Another case:

[1349/2354] Building CXX object Source/WebCore/CMakeFiles...edSources/unified-sources/UnifiedSource-950a39b6-12.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/dom/Element.h:28,
                 from ../../Source/WebCore/dom/StyledElement.h:30,
                 from ../../Source/WebCore/html/HTMLElement.h:26,
                 from ../../Source/WebCore/html/HTMLPictureElement.h:28,
                 from ../../Source/WebCore/html/HTMLPictureElement.cpp:27,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-950a39b6-12.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Element]’ at WTF/Headers/wtf/RefPtr.h:44:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Element; _PtrTraits = WTF::RawPtrTraits<WebCore::Element>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Element>]’ at WTF/Headers/wtf/RefPtr.h:76:61,
    inlined from ‘void WebCore::HTMLSelectElement::recalcListItems(bool) const’ at ../../Source/WebCore/html/HTMLSelectElement.cpp:790:84:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
Comment 6 Michael Catanzaro 2021-04-19 13:48:11 PDT
So we have a few static_asserts in JSC that intentionally trigger this warning: For example, in WasmAirIRGenerator.cpp:

static_assert(sizeof(decltype(static_cast<Instance*>(nullptr)->cachedStackLimit())) == sizeof(uint64_t), "");

I suspect this is technically undefined behavior, but since it's a static_assert I guess the worst that could reasonably happen here would be a build failure, so that seems OK.

The rest seems like false-positives to me. We have warnings from RefPtr.h, CSSValue.h, StyleRule.h, Node.h, ResourceLoader.cpp, and PluginLoader.cpp. In all of these cases, I am unable to judge whether the warnings are false positives or not. Problem is the warning is trying to tell us that the |this| pointer could be NULL, but that only ever happens if something has gone disastrously wrong somewhere else nonobvious, and GCC does not attempt to tell us where like a proper static analysis tool would. These warnings are, therefore, not actionable or useful. Maybe I'm just bad at programming, but I'm skeptical that a developer of average skill would be able to track down and fix any actual problems as a result of these warnings. So I think GCC 11 is going too far here. My proposal is to silence them all.
Comment 7 Michael Catanzaro 2021-04-19 13:54:02 PDT
Here's a representative example:

[841/1653] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-c57e08af-6.cpp.o
In file included from WebCore/DerivedSources/unified-sources/UnifiedSource-c57e08af-6.cpp:3:
../../Source/WebCore/loader/ResourceLoader.cpp: In member function ‘virtual void WebCore::ResourceLoader::didReceiveAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&)’:
../../Source/WebCore/loader/ResourceLoader.cpp:809:81: warning: ‘this’ pointer is null [-Wnonnull]
  809 |     challenge.authenticationClient()->receivedRequestToContinueWithoutCredential(challenge);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

There's no way to know why GCC thinks this is a problem. We have a protectedThis RefPtr here to ensure |this| will always be valid, so it's very unlikely that there is any bug here, or at least not any that can be discerned from the warning message. But even if not for the protector, we would expect to have a dangling reference to |this| (use-after-free code execution vulnerability) rather than a null |this| (which would immediately crash and would merely be a denial of service). I'm not sure how a null |this| could ever practically happen, at least not without a weak pointer somewhere nulling out the memory.
Comment 8 Michael Catanzaro 2021-04-19 14:11:09 PDT
Created attachment 426474 [details]
Patch
Comment 9 Michael Catanzaro 2021-04-19 14:12:12 PDT
Comment on attachment 426474 [details]
Patch

This patch is option one: manually suppress all the warnings.

I'm leaning against this option because it's a large number of cases where our code is not doing anything visibly wrong or suspicious. Instead, I'm tempted to just suppress -Wnonnull project-wide.
Comment 10 Chris Dumez 2021-04-19 14:15:01 PDT
Comment on attachment 426474 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426474&action=review

> Source/WebCore/loader/ResourceLoader.cpp:810
>      challenge.authenticationClient()->receivedRequestToContinueWithoutCredential(challenge);

Source/WebCore/platform/network/soup/AuthenticationChallenge.h:    AuthenticationClient* authenticationClient() const { return nullptr; }

Why are we silencing this? Isn't this a real issue when using Soup? (I haven't checked the other cases).
Comment 11 Michael Catanzaro 2021-04-19 14:15:42 PDT
Created attachment 426475 [details]
Patch
Comment 12 Michael Catanzaro 2021-04-19 14:22:56 PDT
(In reply to Chris Dumez from comment #10)
> Source/WebCore/platform/network/soup/AuthenticationChallenge.h:   
> AuthenticationClient* authenticationClient() const { return nullptr; }

I guess that's score one for GCC 11, zero for Michael. So I made the mistake of assuming the 'this' pointer referred to the ResourceLoader itself, but in fact it is the AuthenticationClient. This was changed in r273236. It seems Carlos is thinking that function should never be called, but still, it does not look good.

I'm going to squint harder at the other cases to see if I can spot any similar problems. But I doubt the other cases will be so easy....
Comment 13 Michael Catanzaro 2021-04-19 14:23:24 PDT
Created attachment 426476 [details]
Patch
Comment 14 Michael Catanzaro 2021-04-19 14:38:42 PDT
(In reply to Michael Catanzaro from comment #12) 
> I'm going to squint harder at the other cases to see if I can spot any
> similar problems. But I doubt the other cases will be so easy....

Yeah, I'm not seeing anything. So I will upload a new patch that does not suppress the warning in ResourceLoader.cpp, but does suppress the other cases. And I'll revise my opinion on suppressing -Wnonnull project-wide, considering it just caught a bug for us. We'll just have to be diligent in suppressing any new false-positives quickly to ensure that warning spam doesn't drown out any real problems, as it did here.
Comment 15 Radar WebKit Bug Importer 2021-04-19 14:38:57 PDT
<rdar://problem/76863576>
Comment 16 Michael Catanzaro 2021-04-19 14:40:16 PDT
Created attachment 426479 [details]
Patch
Comment 17 Chris Dumez 2021-04-19 14:44:26 PDT
Comment on attachment 426474 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426474&action=review

> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:948
>          static_assert(sizeof(decltype(static_cast<Instance*>(nullptr)->cachedStackLimit())) == sizeof(uint64_t), "");

I suspect those types of static assertions can be rewritten like so:
static_assert(sizeof(std::result_of<decltype(&Instance::cachedStackLimit)()>::type) == sizeof(uint64_t), "");
Comment 18 Michael Catanzaro 2021-04-19 14:51:31 PDT
(In reply to Chris Dumez from comment #17)
> I suspect those types of static assertions can be rewritten like so:
> static_assert(sizeof(std::result_of<decltype(&Instance::cachedStackLimit)()>:
> :type) == sizeof(uint64_t), "");

OK, I'll see if this works. I'll still suppress the other warnings, but instead of claiming the warnings are false-positives, I'll instead claim that I don't see any actionable problems.

I'm also going to try posting each instance of these warnings here (other than the static_asserts and the ResourceRequest.cpp one), so others can assess whether there might be real bugs here that I'm missing. I'll use several separate comments for this, since it's going to be a lot.
Comment 19 Michael Catanzaro 2021-04-19 14:56:54 PDT
First we have warnings caused by using RefPtr<RefLogger> inside a HashMap. I'm reasonably confident these are false-positives as a GCC developer has reduced it down to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100086.

[96/1655] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Tests/WTF/HashSet.cpp.o
In file included from WTF/Headers/wtf/HashFunctions.h:26,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/DeletedAddressOfOperator.h:28,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp:29:
In static member function ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = TestWebKitAPI::RefLogger]’,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = TestWebKitAPI::RefLogger; _PtrTraits = WTF::RawPtrTraits<TestWebKitAPI::RefLogger>; _RefDerefTraits = WTF::DefaultRefDerefTraits<TestWebKitAPI::RefLogger>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘virtual void TestWebKitAPI::WTF_HashSet_Ref_Test::TestBody()’ at ../../Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp:429:38:
WTF/Headers/wtf/RefPtr.h:42:23: warning: ‘this’ pointer is null [-Wnonnull]
   42 |             ptr->deref();
      |             ~~~~~~~~~~^~
In file included from ../../Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp:31:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h: In member function ‘virtual void TestWebKitAPI::WTF_HashSet_Ref_Test::TestBody()’:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h:35:10: note: in a call to non-static member function ‘void TestWebKitAPI::RefLogger::deref()’
   35 |     void deref();
      |          ^~~~~

[120/1653] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Tests/WTF/RobinHoodHashSet.cpp.o
In file included from WTF/Headers/wtf/HashFunctions.h:26,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/DeletedAddressOfOperator.h:28,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/RobinHoodHashSet.cpp:29:
In static member function ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = TestWebKitAPI::RefLogger]’,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = TestWebKitAPI::RefLogger; _PtrTraits = WTF::RawPtrTraits<TestWebKitAPI::RefLogger>; _RefDerefTraits = WTF::DefaultRefDerefTraits<TestWebKitAPI::RefLogger>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘virtual void TestWebKitAPI::WTF_RobinHoodHashSet_Ref_Test::TestBody()’ at ../../Tools/TestWebKitAPI/Tests/WTF/RobinHoodHashSet.cpp:444:38:
WTF/Headers/wtf/RefPtr.h:42:23: warning: ‘this’ pointer is null [-Wnonnull]
   42 |             ptr->deref();
      |             ~~~~~~~~~~^~
In file included from ../../Tools/TestWebKitAPI/Tests/WTF/RobinHoodHashSet.cpp:31:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h: In member function ‘virtual void TestWebKitAPI::WTF_RobinHoodHashSet_Ref_Test::TestBody()’:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h:35:10: note: in a call to non-static member function ‘void TestWebKitAPI::RefLogger::deref()’
   35 |     void deref();
      |          ^~~~~

[181/1653] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Tests/WTF/HashMap.cpp.o
In file included from WTF/Headers/wtf/HashFunctions.h:26,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/DeletedAddressOfOperator.h:28,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:30:
In static member function ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = TestWebKitAPI::RefLogger]’,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = TestWebKitAPI::RefLogger; _PtrTraits = WTF::RawPtrTraits<TestWebKitAPI::RefLogger>; _RefDerefTraits = WTF::DefaultRefDerefTraits<TestWebKitAPI::RefLogger>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘virtual void TestWebKitAPI::WTF_HashMap_Ref_Value_Test::TestBody()’ at ../../Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:977:36:
WTF/Headers/wtf/RefPtr.h:42:23: warning: ‘this’ pointer is null [-Wnonnull]
   42 |             ptr->deref();
      |             ~~~~~~~~~~^~
In file included from ../../Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:32:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h: In member function ‘virtual void TestWebKitAPI::WTF_HashMap_Ref_Value_Test::TestBody()’:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h:35:10: note: in a call to non-static member function ‘void TestWebKitAPI::RefLogger::deref()’
   35 |     void deref();
      |          ^~~~~

[187/1653] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Tests/WTF/RobinHoodHashMap.cpp.o
In file included from WTF/Headers/wtf/HashFunctions.h:26,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/DeletedAddressOfOperator.h:28,
                 from ../../Tools/TestWebKitAPI/Tests/WTF/RobinHoodHashMap.cpp:30:
In static member function ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = TestWebKitAPI::RefLogger]’,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = TestWebKitAPI::RefLogger; _PtrTraits = WTF::RawPtrTraits<TestWebKitAPI::RefLogger>; _RefDerefTraits = WTF::DefaultRefDerefTraits<TestWebKitAPI::RefLogger>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘virtual void TestWebKitAPI::WTF_RobinHoodHashMap_Ref_Value_Test::TestBody()’ at ../../Tools/TestWebKitAPI/Tests/WTF/RobinHoodHashMap.cpp:979:36:
WTF/Headers/wtf/RefPtr.h:42:23: warning: ‘this’ pointer is null [-Wnonnull]
   42 |             ptr->deref();
      |             ~~~~~~~~~~^~
In file included from ../../Tools/TestWebKitAPI/Tests/WTF/RobinHoodHashMap.cpp:32:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h: In member function ‘virtual void TestWebKitAPI::WTF_RobinHoodHashMap_Ref_Value_Test::TestBody()’:
../../Tools/TestWebKitAPI/Tests/WTF/RefLogger.h:35:10: note: in a call to non-static member function ‘void TestWebKitAPI::RefLogger::deref()’
   35 |     void deref();
      |          ^~~~~
Comment 20 Darin Adler 2021-04-19 14:58:15 PDT
Comment on attachment 426479 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426479&action=review

> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:947
> +IGNORE_WARNINGS_BEGIN("nonnull")

We should use IGNORE_NULL_CHECK_WARNINGS_BEGIN/END.

> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:948
>          static_assert(sizeof(decltype(static_cast<Instance*>(nullptr)->cachedStackLimit())) == sizeof(uint64_t), "");

As a follow-up, we should seek a way to do this without involving nullptr. I think there might be a way.

> Source/WTF/wtf/RefPtr.h:44
> +IGNORE_WARNINGS_BEGIN("nonnull")
>          if (LIKELY(ptr != nullptr))
>              ptr->deref();
> +IGNORE_WARNINGS_END

This needs a comment. It’s not at all clear why there is a null warning here and why it should be ignored.

> Source/WebCore/css/CSSValue.h:75
> +IGNORE_WARNINGS_BEGIN("nonnull")
>              destroy();
> +IGNORE_WARNINGS_END

This needs a comment. It’s not at all clear why there is a null warning here and why it should be ignored.

> Source/WebCore/css/StyleRule.h:282
> +IGNORE_WARNINGS_BEGIN("nonnull")
>      if (derefBase())
>          const_cast<StyleRuleBase&>(*this).destroy();
> +IGNORE_WARNINGS_END

This needs a comment. It’s not at all clear why there is a null warning here and why it should be ignored.

> Source/WebCore/dom/Node.h:799
> +IGNORE_WARNINGS_BEGIN("nonnull")
>          const_cast<Node&>(*this).removedLastRef();
> +IGNORE_WARNINGS_END

This needs a comment. It’s not at all clear why there is a null warning here and why it should be ignored.

> Source/WebKit/WebProcess/Plugins/PluginView.cpp:155
> +IGNORE_WARNINGS_BEGIN("nonnull")
>  PluginView::Stream::~Stream()
>  {
>      if (m_loadCallback)
>          m_loadCallback({ });
>      ASSERT(!m_pluginView);
>  }
> +IGNORE_WARNINGS_END

This needs a comment. It’s not at all clear why there is a null warning here and why it should be ignored.
Comment 21 Michael Catanzaro 2021-04-19 15:03:39 PDT
Huge spam from Node.h:797

[749/1653] Building CXX object Source/WebCore/CMakeFiles/...edSources/unified-sources/UnifiedSource-2f84417a-14.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/css/StyleProperties.cpp:37,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-2f84417a-14.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::StyleSheetContents::_ZN7WebCore18StyleSheetContents11checkLoadedEv.part.0()’ at ../../Source/WebCore/css/StyleSheetContents.cpp:377:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::StyleSheetContents::_ZN7WebCore18StyleSheetContents11checkLoadedEv.part.0()’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[761/1653] Building CXX object Source/WebCore/CMakeFiles/...edSources/unified-sources/UnifiedSource-be65d27a-10.cpp.o
In file included from ../../Source/WebCore/dom/FocusEvent.cpp:29,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-be65d27a-10.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Element]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Element; _PtrTraits = WTF::RawPtrTraits<WebCore::Element>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Element>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval(WebCore::Node&, WebCore::Document::NodeRemoval)’ at ../../Source/WebCore/dom/FullscreenManager.cpp:595:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval(WebCore::Node&, WebCore::Document::NodeRemoval)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[771/1653] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-be65d27a-3.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/dom/Element.h:28,
                 from ../../Source/WebCore/dom/ElementTraversal.h:27,
                 from ../../Source/WebCore/dom/ElementIterator.h:28,
                 from ../../Source/WebCore/html/CollectionTraversal.h:29,
                 from ../../Source/WebCore/dom/LiveNodeList.h:27,
                 from ../../Source/WebCore/html/HTMLCollection.h:27,
                 from ../../Source/WebCore/html/CachedHTMLCollection.h:28,
                 from ../../Source/WebCore/dom/ClassCollection.h:32,
                 from ../../Source/WebCore/dom/ClassCollection.cpp:31,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-be65d27a-3.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WebCore::NodeVector WebCore::ContainerNode::removeAllChildrenWithScriptAssertion(WebCore::ContainerNode::ChildChange::Source, WebCore::ContainerNode::DeferChildrenChanged)’ at WTF/Headers/wtf/RefPtr.h:73:19,
    inlined from ‘void WebCore::ContainerNode::_ZN7WebCore13ContainerNode14removeChildrenEv.part.0()’ at ../../Source/WebCore/dom/ContainerNode.cpp:717:41:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::ContainerNode::_ZN7WebCore13ContainerNode14removeChildrenEv.part.0()’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WebCore::NodeVector WebCore::ContainerNode::removeAllChildrenWithScriptAssertion(WebCore::ContainerNode::ChildChange::Source, WebCore::ContainerNode::DeferChildrenChanged)’ at WTF/Headers/wtf/RefPtr.h:73:19,
    inlined from ‘void WebCore::ContainerNode::_ZN7WebCore13ContainerNode14removeChildrenEv.part.0()’ at ../../Source/WebCore/dom/ContainerNode.cpp:717:41:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::ContainerNode::_ZN7WebCore13ContainerNode14removeChildrenEv.part.0()’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WebCore::NodeVector WebCore::ContainerNode::removeAllChildrenWithScriptAssertion(WebCore::ContainerNode::ChildChange::Source, WebCore::ContainerNode::DeferChildrenChanged)’ at WTF/Headers/wtf/RefPtr.h:73:19,
    inlined from ‘WebCore::ExceptionOr<void> WebCore::ContainerNode::removeSelfOrChildNodesForInsertion(WebCore::Node&, WebCore::NodeVector&)’ at ../../Source/WebCore/dom/ContainerNode.cpp:262:115:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘WebCore::ExceptionOr<void> WebCore::ContainerNode::removeSelfOrChildNodesForInsertion(WebCore::Node&, WebCore::NodeVector&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WebCore::NodeVector WebCore::ContainerNode::removeAllChildrenWithScriptAssertion(WebCore::ContainerNode::ChildChange::Source, WebCore::ContainerNode::DeferChildrenChanged)’ at WTF/Headers/wtf/RefPtr.h:73:19,
    inlined from ‘WebCore::ExceptionOr<void> WebCore::ContainerNode::removeSelfOrChildNodesForInsertion(WebCore::Node&, WebCore::NodeVector&)’ at ../../Source/WebCore/dom/ContainerNode.cpp:262:115:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘WebCore::ExceptionOr<void> WebCore::ContainerNode::removeSelfOrChildNodesForInsertion(WebCore::Node&, WebCore::NodeVector&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WebCore::NodeVector WebCore::ContainerNode::removeAllChildrenWithScriptAssertion(WebCore::ContainerNode::ChildChange::Source, WebCore::ContainerNode::DeferChildrenChanged)’ at WTF/Headers/wtf/RefPtr.h:73:19,
    inlined from ‘WebCore::ExceptionOr<void> WebCore::ContainerNode::replaceChildren(WTF::Vector<WTF::Variant<WTF::RefPtr<WebCore::Node, WTF::RawPtrTraits<WebCore::Node>, WTF::DefaultRefDerefTraits<WebCore::Node> >, WTF::String> >&&)’ at ../../Source/WebCore/dom/ContainerNode.cpp:1020:41:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘WebCore::ExceptionOr<void> WebCore::ContainerNode::replaceChildren(WTF::Vector<WTF::Variant<WTF::RefPtr<WebCore::Node, WTF::RawPtrTraits<WebCore::Node>, WTF::DefaultRefDerefTraits<WebCore::Node> >, WTF::String> >&&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WebCore::NodeVector WebCore::ContainerNode::removeAllChildrenWithScriptAssertion(WebCore::ContainerNode::ChildChange::Source, WebCore::ContainerNode::DeferChildrenChanged)’ at WTF/Headers/wtf/RefPtr.h:73:19,
    inlined from ‘WebCore::ExceptionOr<void> WebCore::ContainerNode::replaceChildren(WTF::Vector<WTF::Variant<WTF::RefPtr<WebCore::Node, WTF::RawPtrTraits<WebCore::Node>, WTF::DefaultRefDerefTraits<WebCore::Node> >, WTF::String> >&&)’ at ../../Source/WebCore/dom/ContainerNode.cpp:1020:41:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘WebCore::ExceptionOr<void> WebCore::ContainerNode::replaceChildren(WTF::Vector<WTF::Variant<WTF::RefPtr<WebCore::Node, WTF::RawPtrTraits<WebCore::Node>, WTF::DefaultRefDerefTraits<WebCore::Node> >, WTF::String> >&&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WebCore::NodeVector WebCore::ContainerNode::removeAllChildrenWithScriptAssertion(WebCore::ContainerNode::ChildChange::Source, WebCore::ContainerNode::DeferChildrenChanged)’ at WTF/Headers/wtf/RefPtr.h:73:19,
    inlined from ‘void WebCore::ContainerNode::replaceAllChildrenWithNewText(const WTF::String&)’ at ../../Source/WebCore/dom/ContainerNode.cpp:690:41:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::ContainerNode::replaceAllChildrenWithNewText(const WTF::String&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Node]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Node; _PtrTraits = WTF::RawPtrTraits<WebCore::Node>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Node>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WebCore::NodeVector WebCore::ContainerNode::removeAllChildrenWithScriptAssertion(WebCore::ContainerNode::ChildChange::Source, WebCore::ContainerNode::DeferChildrenChanged)’ at WTF/Headers/wtf/RefPtr.h:73:19,
    inlined from ‘void WebCore::ContainerNode::replaceAllChildrenWithNewText(const WTF::String&)’ at ../../Source/WebCore/dom/ContainerNode.cpp:690:41:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::ContainerNode::replaceAllChildrenWithNewText(const WTF::String&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[778/1653] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-f34946be-1.cpp.o
In file included from ../../Source/WebCore/dom/BoundaryPoint.h:28,
                 from ../../Source/WebCore/dom/SimpleRange.h:28,
                 from ../../Source/WebCore/dom/DocumentMarker.h:24,
                 from ../../Source/WebCore/editing/AlternativeTextController.h:29,
                 from ../../Source/WebCore/editing/AlternativeTextController.cpp:28,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-f34946be-1.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::ContainerNode]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::ContainerNode; _PtrTraits = WTF::RawPtrTraits<WebCore::ContainerNode>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::ContainerNode>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::CompositeEditCommand::insertNodeAfter(WTF::Ref<WebCore::Node, WTF::RawPtrTraits<WebCore::Node> >&&, WebCore::Node&)’ at ../../Source/WebCore/editing/CompositeEditCommand.cpp:566:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::CompositeEditCommand::insertNodeAfter(WTF::Ref<WebCore::Node, WTF::RawPtrTraits<WebCore::Node> >&&, WebCore::Node&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::ContainerNode]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::ContainerNode; _PtrTraits = WTF::RawPtrTraits<WebCore::ContainerNode>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::ContainerNode>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::ApplyStyleCommand::applyBlockStyle(WebCore::EditingStyle&)’ at ../../Source/WebCore/editing/ApplyStyleCommand.cpp:247:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::ApplyStyleCommand::applyBlockStyle(WebCore::EditingStyle&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[782/1653] Building CXX object Source/WebCore/CMakeFiles/...edSources/unified-sources/UnifiedSource-be65d27a-18.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/dom/Element.h:28,
                 from ../../Source/WebCore/css/SelectorChecker.h:31,
                 from ../../Source/WebCore/cssjit/SelectorCompiler.h:31,
                 from ../../Source/WebCore/dom/SelectorQuery.h:31,
                 from ../../Source/WebCore/dom/SelectorQuery.cpp:28,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-be65d27a-18.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::HTMLSlotElement]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::HTMLSlotElement; _PtrTraits = WTF::RawPtrTraits<WebCore::HTMLSlotElement>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::HTMLSlotElement>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::SlotAssignment::didChangeSlot(const WTF::AtomString&, WebCore::ShadowRoot&)’ at ../../Source/WebCore/dom/SlotAssignment.cpp:317:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::SlotAssignment::didChangeSlot(const WTF::AtomString&, WebCore::ShadowRoot&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[787/1653] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-f34946be-7.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/CharacterData.h:25,
                 from ../../Source/WebCore/dom/Position.h:28,
                 from ../../Source/WebCore/editing/VisiblePosition.h:29,
                 from ../../Source/WebCore/editing/VisibleSelection.h:29,
                 from ../../Source/WebCore/editing/EditCommand.h:30,
                 from ../../Source/WebCore/editing/SplitTextNodeCommand.h:28,
                 from ../../Source/WebCore/editing/SplitTextNodeCommand.cpp:27,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-f34946be-7.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Document]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Document; _PtrTraits = WTF::RawPtrTraits<WebCore::Document>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Document>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::TextManipulationController::startObservingParagraphs(WebCore::TextManipulationController::ManipulationItemCallback&&, WTF::Vector<WebCore::TextManipulationController::ExclusionRule>&&)’ at ../../Source/WebCore/editing/TextManipulationController.cpp:128:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::TextManipulationController::startObservingParagraphs(WebCore::TextManipulationController::ManipulationItemCallback&&, WTF::Vector<WebCore::TextManipulationController::ExclusionRule>&&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[791/1653] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-950a39b6-2.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/dom/Element.h:28,
                 from ../../Source/WebCore/dom/StyledElement.h:30,
                 from ../../Source/WebCore/html/HTMLElement.h:26,
                 from ../../Source/WebCore/html/HTMLCanvasElement.h:33,
                 from ../../Source/WebCore/css/CSSCanvasValue.h:30,
                 from ../../Source/WebCore/html/CanvasBase.cpp:29,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-950a39b6-2.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::HTMLElement]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::HTMLElement; _PtrTraits = WTF::RawPtrTraits<WebCore::HTMLElement>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::HTMLElement>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::ColorInputType::updateColorSwatch()’ at ../../Source/WebCore/html/ColorInputType.cpp:240:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::ColorInputType::updateColorSwatch()’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[793/1653] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-f34946be-3.cpp.o
In file included from ../../Source/WebCore/dom/BoundaryPoint.h:28,
                 from ../../Source/WebCore/dom/SimpleRange.h:28,
                 from ../../Source/WebCore/dom/DocumentMarker.h:24,
                 from ../../Source/WebCore/editing/Editor.h:29,
                 from ../../Source/WebCore/editing/Editor.cpp:28,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-f34946be-3.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Element]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Element; _PtrTraits = WTF::RawPtrTraits<WebCore::Element>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Element>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::Editor::replaceSelectionWithFragment(WebCore::DocumentFragment&, WebCore::Editor::SelectReplacement, WebCore::Editor::SmartReplace, WebCore::Editor::MatchStyle, WebCore::EditAction, WebCore::MailBlockquoteHandling)’ at ../../Source/WebCore/editing/Editor.cpp:722:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::Editor::replaceSelectionWithFragment(WebCore::DocumentFragment&, WebCore::Editor::SelectReplacement, WebCore::Editor::SmartReplace, WebCore::Editor::MatchStyle, WebCore::EditAction, WebCore::MailBlockquoteHandling)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[815/1653] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-950a39b6-7.cpp.o
In file included from ../../Source/WebCore/html/FormAssociatedElement.h:27,
                 from ../../Source/WebCore/html/HTMLFormControlElement.h:27,
                 from ../../Source/WebCore/html/HTMLFieldSetElement.h:26,
                 from ../../Source/WebCore/html/HTMLFieldSetElement.cpp:26,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-950a39b6-7.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::HTMLLegendElement]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::HTMLLegendElement; _PtrTraits = WTF::RawPtrTraits<WebCore::HTMLLegendElement>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::HTMLLegendElement>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘virtual void WebCore::HTMLFieldSetElement::childrenChanged(const WebCore::ContainerNode::ChildChange&)’ at ../../Source/WebCore/html/HTMLFieldSetElement.cpp:122:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘virtual void WebCore::HTMLFieldSetElement::childrenChanged(const WebCore::ContainerNode::ChildChange&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[820/1653] Building CXX object Source/WebCore/CMakeFiles/...edSources/unified-sources/UnifiedSource-950a39b6-17.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/dom/Element.h:28,
                 from ../../Source/WebCore/dom/StyledElement.h:30,
                 from ../../Source/WebCore/html/HTMLElement.h:26,
                 from ../../Source/WebCore/html/LabelableElement.h:33,
                 from ../../Source/WebCore/html/LabelableElement.cpp:26,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-950a39b6-17.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::HTMLElement]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::HTMLElement; _PtrTraits = WTF::RawPtrTraits<WebCore::HTMLElement>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::HTMLElement>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::MediaDocument::replaceMediaElementTimerFired()’ at ../../Source/WebCore/html/MediaDocument.cpp:227:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::MediaDocument::replaceMediaElementTimerFired()’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::HTMLVideoElement]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::HTMLVideoElement; _PtrTraits = WTF::RawPtrTraits<WebCore::HTMLVideoElement>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::HTMLVideoElement>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘virtual void WebCore::MediaDocument::defaultEventHandler(WebCore::Event&)’ at ../../Source/WebCore/html/MediaDocument.cpp:206:13,
    inlined from ‘virtual void WebCore::MediaDocument::defaultEventHandler(WebCore::Event&)’ at ../../Source/WebCore/html/MediaDocument.cpp:176:6:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘virtual void WebCore::MediaDocument::defaultEventHandler(WebCore::Event&)’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[822/1653] Building CXX object Source/WebCore/CMakeFiles/...edSources/unified-sources/UnifiedSource-950a39b6-12.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/dom/Element.h:28,
                 from ../../Source/WebCore/dom/StyledElement.h:30,
                 from ../../Source/WebCore/html/HTMLElement.h:26,
                 from ../../Source/WebCore/html/HTMLPictureElement.h:28,
                 from ../../Source/WebCore/html/HTMLPictureElement.cpp:27,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-950a39b6-12.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Element]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Element; _PtrTraits = WTF::RawPtrTraits<WebCore::Element>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Element>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::HTMLSelectElement::recalcListItems(bool) const’ at ../../Source/WebCore/html/HTMLSelectElement.cpp:790:84:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::HTMLSelectElement::recalcListItems(bool) const’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
[904/1653] Building CXX object Source/WebCore/CMakeFiles/...vedSources/unified-sources/UnifiedSource-767013ce-3.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/page/Frame.h:32,
                 from ../../Source/WebCore/page/DebugPageOverlays.h:29,
                 from ../../Source/WebCore/page/DebugPageOverlays.cpp:27,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-767013ce-3.cpp:2:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Document]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Document; _PtrTraits = WTF::RawPtrTraits<WebCore::Document>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Document>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::EventHandler::sendScrollEvent()’ at ../../Source/WebCore/page/EventHandler.cpp:4263:9:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::EventHandler::sendScrollEvent()’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[1013/1653] Building CXX object Source/WebCore/CMakeFiles...vedSources/unified-sources/UnifiedSource-8feba646-3.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/dom/Element.h:28,
                 from ../../Source/WebCore/dom/StyledElement.h:30,
                 from ../../Source/WebCore/svg/SVGElement.h:30,
                 from ../../Source/WebCore/svg/SVGGraphicsElement.h:24,
                 from ../../Source/WebCore/svg/SVGDefsElement.h:24,
                 from ../../Source/WebCore/svg/SVGDefsElement.cpp:23,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-8feba646-3.cpp:1:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Element]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Element; _PtrTraits = WTF::RawPtrTraits<WebCore::Element>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Element>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::SVGElement::buildPendingResourcesIfNeeded()’ at WTF/Headers/wtf/RefPtr.h:73:19:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::SVGElement::buildPendingResourcesIfNeeded()’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[1022/1653] Building CXX object Source/WebCore/CMakeFiles...edSources/unified-sources/UnifiedSource-8feba646-17.cpp.o
In file included from ../../Source/WebCore/dom/ContainerNode.h:27,
                 from ../../Source/WebCore/dom/Document.h:33,
                 from ../../Source/WebCore/svg/animation/SMILTimeContainer.cpp:29,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-8feba646-17.cpp:2:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Element]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Element; _PtrTraits = WTF::RawPtrTraits<WebCore::Element>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Element>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebCore::SVGSMILElement::connectConditions()’ at ../../Source/WebCore/svg/animation/SVGSMILElement.cpp:556:17:
../../Source/WebCore/dom/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../Source/WebCore/dom/Node.h: In member function ‘void WebCore::SVGSMILElement::connectConditions()’:
../../Source/WebCore/dom/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~

[1463/1653] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir/WebProcess/WebPage/WebPage.cpp.o
In file included from WebCore/PrivateHeaders/WebCore/ContainerNode.h:27,
                 from WebCore/PrivateHeaders/WebCore/CharacterData.h:25,
                 from WebCore/PrivateHeaders/WebCore/Position.h:28,
                 from WebCore/PrivateHeaders/WebCore/TextManipulationController.h:28,
                 from DerivedSources/WebKit/WebPageMessagesReplies.h:44,
                 from ../../Source/WebKit/WebProcess/WebPage/WebPage.h:60,
                 from ../../Source/WebKit/WebProcess/WebPage/WebPage.cpp:29:
In member function ‘void WebCore::Node::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::Document]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::Document; _PtrTraits = WTF::RawPtrTraits<WebCore::Document>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::Document>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘void WebKit::WebPage::startTextManipulations(WTF::Vector<WebCore::TextManipulationController::ExclusionRule>&&, WTF::CompletionHandler<void()>&&)’ at ../../Source/WebKit/WebProcess/WebPage/WebPage.cpp:7144:9:
WebCore/PrivateHeaders/WebCore/Node.h:797:48: warning: ‘this’ pointer is null [-Wnonnull]
  797 |         const_cast<Node&>(*this).removedLastRef();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
WebCore/PrivateHeaders/WebCore/Node.h: In member function ‘void WebKit::WebPage::startTextManipulations(WTF::Vector<WebCore::TextManipulationController::ExclusionRule>&&, WTF::CompletionHandler<void()>&&)’:
WebCore/PrivateHeaders/WebCore/Node.h:691:25: note: in a call to non-static member function ‘void WebCore::Node::removedLastRef()’
  691 |     WEBCORE_EXPORT void removedLastRef();
      |                         ^~~~~~~~~~~~~~
Comment 22 Michael Catanzaro 2021-04-19 15:06:44 PDT
Here's CSSValue.h:

In file included from ../../Source/WebCore/css/CSSPrimitiveValue.h:26,
                 from ../../Source/WebCore/css/parser/CSSParserToken.h:32,
                 from ../../Source/WebCore/css/parser/CSSParserToken.cpp:31,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-2f84417a-16.cpp:2:
In member function ‘void WebCore::CSSValue::deref()’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebCore::CSSValue]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebCore::CSSValue; _PtrTraits = WTF::RawPtrTraits<WebCore::CSSValue>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::CSSValue>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WTF::RefPtr<WebCore::CSSValue> WebCore::consumeCursor(WebCore::CSSParserTokenRange&, const WebCore::CSSParserContext&, bool)’ at WTF/Headers/wtf/RefPtr.h:73:19:
../../Source/WebCore/css/CSSValue.h:73:20: warning: ‘this’ pointer is null [-Wnonnull]
   73 |             destroy();
      |             ~~~~~~~^~
../../Source/WebCore/css/CSSValue.h: In function ‘WTF::RefPtr<WebCore::CSSValue> WebCore::consumeCursor(WebCore::CSSParserTokenRange&, const WebCore::CSSParserContext&, bool)’:
../../Source/WebCore/css/CSSValue.h:256:25: note: in a call to non-static member function ‘void WebCore::CSSValue::destroy()’
  256 |     WEBCORE_EXPORT void destroy();
      |                         ^~~~~~~

This one is pretty simple. I just don't see how anything could possibly be wrong here, at least not based on the warning.
Comment 23 Michael Catanzaro 2021-04-19 15:08:05 PDT
StyleRule.h, similar to CSSValue.h:

In file included from ../../Source/WebCore/style/RuleData.h:25,
                 from ../../Source/WebCore/style/RuleSet.h:25,
                 from ../../Source/WebCore/style/ElementRuleCollector.h:25,
                 from ../../Source/WebCore/style/StyleResolver.h:25,
                 from ../../Source/WebCore/inspector/InspectorOverlay.cpp:69,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-84c9f43f-3.cpp:4:
In member function ‘void WebCore::StyleRuleBase::deref() const’,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = const WebCore::StyleRule]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = const WebCore::StyleRule; _PtrTraits = WTF::RawPtrTraits<const WebCore::StyleRule>; _RefDerefTraits = WTF::DefaultRefDerefTraits<const WebCore::StyleRule>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘WTF::Vector<WTF::String> WebCore::authoredGridTrackSizes(WebCore::Node*, WebCore::GridTrackSizingDirection, unsigned int)’ at ../../Source/WebCore/inspector/InspectorOverlay.cpp:1513:17:
../../Source/WebCore/css/StyleRule.h:280:50: warning: ‘this’ pointer is null [-Wnonnull]
  280 |         const_cast<StyleRuleBase&>(*this).destroy();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from ../../Source/WebCore/style/RuleData.h:25,
                 from ../../Source/WebCore/style/RuleSet.h:25,
                 from ../../Source/WebCore/style/ElementRuleCollector.h:25,
                 from ../../Source/WebCore/style/StyleResolver.h:25,
                 from ../../Source/WebCore/inspector/InspectorOverlay.cpp:69,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-84c9f43f-3.cpp:4:
../../Source/WebCore/css/StyleRule.h: In function ‘WTF::Vector<WTF::String> WebCore::authoredGridTrackSizes(WebCore::Node*, WebCore::GridTrackSizingDirection, unsigned int)’:
../../Source/WebCore/css/StyleRule.h:77:25: note: in a call to non-static member function ‘void WebCore::StyleRuleBase::destroy()’
   77 |     WEBCORE_EXPORT void destroy();
      |                         ^~~~~~~
Comment 24 Michael Catanzaro 2021-04-19 15:13:42 PDT
Last we have PluginView.cpp:

[1464/1653] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir/WebProcess/Plugins/PluginView.cpp.o
In destructor ‘virtual WebKit::PluginView::Stream::~Stream()’,
    inlined from ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = WebKit::PluginView::Stream]’ at /usr/include/c++/11/bits/unique_ptr.h:85:2,
    inlined from ‘void WTF::RefCounted<T, Deleter>::deref() const [with T = WebKit::PluginView::Stream; Deleter = std::default_delete<WebKit::PluginView::Stream>]’ at WTF/Headers/wtf/RefCounted.h:190:22,
    inlined from ‘void WTF::RefCounted<T, Deleter>::deref() const [with T = WebKit::PluginView::Stream; Deleter = std::default_delete<WebKit::PluginView::Stream>]’ at WTF/Headers/wtf/RefCounted.h:187:10,
    inlined from ‘static void WTF::DefaultRefDerefTraits< <template-parameter-1-1> >::derefIfNotNull(T*) [with T = WebKit::PluginView::Stream]’ at WTF/Headers/wtf/RefPtr.h:42:23,
    inlined from ‘WTF::RefPtr<T, <template-parameter-1-2>, <template-parameter-1-3> >::~RefPtr() [with T = WebKit::PluginView::Stream; _PtrTraits = WTF::RawPtrTraits<WebKit::PluginView::Stream>; _RefDerefTraits = WTF::DefaultRefDerefTraits<WebKit::PluginView::Stream>]’ at WTF/Headers/wtf/RefPtr.h:73:61,
    inlined from ‘virtual void WebKit::PluginView::continueStreamLoad(uint64_t)’ at ../../Source/WebKit/WebProcess/Plugins/PluginView.cpp:1390:9:
../../Source/WebKit/WebProcess/Plugins/PluginView.cpp:153:1: warning: ‘this’ pointer is null [-Wnonnull]
  153 | }
      | ^
../../Source/WebKit/WebProcess/Plugins/PluginView.cpp: In member function ‘virtual void WebKit::PluginView::continueStreamLoad(uint64_t)’:
../../Source/WebKit/WebProcess/Plugins/PluginView.cpp:148:1: note: in a call to non-static member function ‘virtual WebKit::PluginView::Stream::~Stream()’
  148 | PluginView::Stream::~Stream()
      | ^~~~~~~~~~
Comment 25 Darin Adler 2021-04-19 15:33:35 PDT
I’m having a lot of trouble understanding where the null problem is (even if maybe a false positive due to a compiler bug) and why we end up adding the warning suppression so far from the cause, inside functions with wider applicability. Anything we can do to move the ignore macros closer to the cause, and making it clear they are a workaround for a GCC bug or a GCC mystery diagnostic that may be a bug, makes it better.

Also might be nice to use different macros to say "ignore a bogus warning" from "ignore a legitimate warning because we understand the situation" to cut down on the need for comments everywhere making that distinction. I think it’s worth making a custom macro pair if we have a big pattern of incorrect warnings. And if it’s compiler-specific, maybe name the macro with the compiler name.

Not 100% clear on how we have been deciding when to use IGNORE_WARNING and when the compiler-specific versions. Maybe we should not have both any more?
Comment 26 Jonathan Wakely 2021-04-20 02:39:09 PDT
(In reply to Chris Dumez from comment #17)
> Comment on attachment 426474 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426474&action=review
> 
> > Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:948
> >          static_assert(sizeof(decltype(static_cast<Instance*>(nullptr)->cachedStackLimit())) == sizeof(uint64_t), "");
> 
> I suspect those types of static assertions can be rewritten like so:
> static_assert(sizeof(std::result_of<decltype(&Instance::cachedStackLimit)()>:
> :type) == sizeof(uint64_t), "");

Your result_of syntax is wrong. To invoke a pointer to member you need to provide an object of the class type as the first argument, e.g.

std::result_of<decltype(&Instance::cachedStackLimit)(Instance&)>::type

But this is expensive to compile, and fugly, and std::result_of was deprecated in C++17 and removed from C++20.

You want to ask the compiler a question about calling cachedStackLimit() in an unevaluated context ... that's exactly what std::declval is for. Then you don't need to play games with null pointers, and don't need the compilation overhead and comprehension overhead of std::result_of.

And why sizeof(decltype(...)) instead of just sizeof(...)? Is this an obfuscated code contest?

static_assert(sizeof(std::declval<Instance*>()->cachedStackLimit()) == sizeof(uint64_t), "");
Comment 27 Michael Catanzaro 2021-04-20 07:58:49 PDT
(In reply to Jonathan Wakely from comment #26)
> static_assert(sizeof(std::declval<Instance*>()->cachedStackLimit()) ==
> sizeof(uint64_t), "");

I appreciate the tips. Will try that instead.
Comment 28 Michael Catanzaro 2021-04-20 13:00:17 PDT
(In reply to Jonathan Wakely from comment #26)
> static_assert(sizeof(std::declval<Instance*>()->cachedStackLimit()) ==
> sizeof(uint64_t), "");

I've split these out to bug #224826.

(In reply to Darin Adler from comment #25)
> I’m having a lot of trouble understanding where the null problem is (even if
> maybe a false positive due to a compiler bug) and why we end up adding the
> warning suppression so far from the cause, inside functions with wider
> applicability. Anything we can do to move the ignore macros closer to the
> cause, and making it clear they are a workaround for a GCC bug or a GCC
> mystery diagnostic that may be a bug, makes it better.

Well I can *try* moving them from headers to source files, but I'm not sure if it will work or not. I suspect they probably need to be used at the point where the compiler emits the warning, not where the human would wish it emitted the warning.

> Also might be nice to use different macros to say "ignore a bogus warning"
> from "ignore a legitimate warning because we understand the situation" to
> cut down on the need for comments everywhere making that distinction. I
> think it’s worth making a custom macro pair if we have a big pattern of
> incorrect warnings. And if it’s compiler-specific, maybe name the macro with
> the compiler name.

How about:

IGNORE_BOGUS_GCC_NULL_CHECK_WARNINGS_BEGIN
IGNORE_BOGUS_GCC_NULL_CHECK_WARNINGS_END

I'll make it GCC-specific so that we keep the warning enabled when building with clang.

> Not 100% clear on how we have been deciding when to use IGNORE_WARNING and
> when the compiler-specific versions. Maybe we should not have both any more?

If you try to suppress a warning that doesn't exist, I'm pretty sure GCC is going to warn, which is useful if you accidentally misspell the warning name, for example. So I think IGNORE_CLANG_WARNINGS_BEGIN is really needed. But if Clang is more permissive about that, then perhaps the IGNORE_GCC_WARNINGS_BEGIN variant is not needed.
Comment 29 Darin Adler 2021-04-20 15:03:08 PDT
(In reply to Michael Catanzaro from comment #28)
> Well I can *try* moving them from headers to source files, but I'm not sure
> if it will work or not. I suspect they probably need to be used at the point
> where the compiler emits the warning, not where the human would wish it
> emitted the warning.

I think it’s worth a try but maybe not worth working hard and trying for a very long time.

> > Also might be nice to use different macros to say "ignore a bogus warning"
> > from "ignore a legitimate warning because we understand the situation" to
> > cut down on the need for comments everywhere making that distinction. I
> > think it’s worth making a custom macro pair if we have a big pattern of
> > incorrect warnings. And if it’s compiler-specific, maybe name the macro with
> > the compiler name.
>
> IGNORE_BOGUS_GCC_NULL_CHECK_WARNINGS_BEGIN
> IGNORE_BOGUS_GCC_NULL_CHECK_WARNINGS_END

I think that’s fine; better to make a special macro than to have to scatter comments everywhere to keep saying the same thing. I’m not sure we should literally say "BOGUS". Maybe "erroneous" is a more factual, less scornful term to use.

> If you try to suppress a warning that doesn't exist, I'm pretty sure GCC is
> going to warn, which is useful if you accidentally misspell the warning
> name, for example. So I think IGNORE_CLANG_WARNINGS_BEGIN is really needed.
> But if Clang is more permissive about that, then perhaps the
> IGNORE_GCC_WARNINGS_BEGIN variant is not needed.

Yes, that explains it. Didn’t realize GCC was unique in this respect among the three major compilers we support. If so, maybe we should remove IGNORE_GCC_WARNINGS_BEGIN entirely and add it some day only if we have a future need for it. Many of our existing IGNORE_WARNINGS_BEGIN are implicitly GCC or implicitly GCC/clang and for now we don’t need to make this distinction.
Comment 30 Michael Catanzaro 2021-04-20 15:15:56 PDT
(In reply to Darin Adler from comment #29)
> I think it’s worth a try but maybe not worth working hard and trying for a
> very long time.

Well it was easy to try, because there's only one other place the macros could possibly go. In the case of the HashMap.cpp:

diff --git a/Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp b/Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp
index c843e7c55ab1..1eb7b73935d5 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp
@@ -973,8 +973,9 @@ TEST(WTF_HashMap, Ref_Value)
 
     {
         HashMap<int, Ref<RefLogger>> map;
-        
+IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN
         auto emptyTake = map.take(1);
+IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_END
         ASSERT_FALSE(static_cast<bool>(emptyTake));
     }
 
This didn't work unfortunately. The macros really have to go directly in RefPtr.h to avoid the warning.

(In reply to Darin Adler from comment #29)
> Yes, that explains it. Didn’t realize GCC was unique in this respect among
> the three major compilers we support. If so, maybe we should remove
> IGNORE_GCC_WARNINGS_BEGIN entirely and add it some day only if we have a
> future need for it. Many of our existing IGNORE_WARNINGS_BEGIN are
> implicitly GCC or implicitly GCC/clang and for now we don’t need to make
> this distinction.

There is one minor advantage to keeping it that I can think of: it allows us to silence an erroneous warning only for GCC and not for Clang. I'm going to use it to implement IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN. This means Clang can still warn if it detects some actual null dereference problem in this code in the future. That's hardly essential, though. I'm totally fine with removing IGNORE_GCC_WARNINGS_BEGIN in a separate bug report, if you prefer.
Comment 31 Darin Adler 2021-04-20 15:34:12 PDT
(In reply to Michael Catanzaro from comment #30)
> There is one minor advantage to keeping it that I can think of: it allows us
> to silence an erroneous warning only for GCC and not for Clang. I'm going to
> use it to implement IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN. This
> means Clang can still warn if it detects some actual null dereference
> problem in this code in the future.

Sounds smart. Let’s not remove IGNORE_GCC_WARNINGS_BEGIN.

Although you and I, at least, will know that IGNORE_WARNINGS_BEGIN is sometimes used when we mean IGNORE_GCC_WARNINGS_BEGIN because the mistake is usually harmless and undetectable. In cases where we are not working around a bug, I guess it’s all about predicting whether clang will some day add the same warning with the same name and benefit from us already having code to ignore false positives.
Comment 32 Michael Catanzaro 2021-04-20 15:45:09 PDT
Created attachment 426605 [details]
Patch
Comment 33 Darin Adler 2021-04-20 15:47:52 PDT
Comment on attachment 426605 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426605&action=review

> Source/WTF/wtf/Compiler.h:507
> +#define IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN IGNORE_GCC_WARNINGS_BEGIN("nonnull")
> +#define IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_END IGNORE_GCC_WARNINGS_END

Maybe there should be a comment here pointing at the GCC compiler bug?

> Source/WebCore/dom/Node.h:797
> +// https://bugs.webkit.org/show_bug.cgi?id=224452#c21

Do we really need these comments? Maybe a single comment at the definition of IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN is enough.

> Source/WebKit/WebProcess/Plugins/PluginView.cpp:149
> +// https://bugs.webkit.org/show_bug.cgi?id=224452#c24
> +IGNORE_NULL_CHECK_WARNINGS_BEGIN

Ditto.

Shouldn’t this be using IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN? Or is this different?
Comment 34 Michael Catanzaro 2021-04-20 15:53:40 PDT
(In reply to Chris Dumez from comment #10)
> Source/WebCore/platform/network/soup/AuthenticationChallenge.h:   
> AuthenticationClient* authenticationClient() const { return nullptr; }
> 
> Why are we silencing this? Isn't this a real issue when using Soup? (I
> haven't checked the other cases).

Bug #224838
Comment 35 Michael Catanzaro 2021-04-20 15:57:22 PDT
Comment on attachment 426605 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426605&action=review

>> Source/WTF/wtf/Compiler.h:507
>> +#define IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_END IGNORE_GCC_WARNINGS_END
> 
> Maybe there should be a comment here pointing at the GCC compiler bug?

Sure.

>> Source/WebCore/dom/Node.h:797
>> +// https://bugs.webkit.org/show_bug.cgi?id=224452#c21
> 
> Do we really need these comments? Maybe a single comment at the definition of IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN is enough.

Oops, that's just an oversight. Seems I failed to review this patch to ensure it actually contains what I thought it did before uploading it. Will remove.

>> Source/WebKit/WebProcess/Plugins/PluginView.cpp:149
>> +IGNORE_NULL_CHECK_WARNINGS_BEGIN
> 
> Ditto.
> 
> Shouldn’t this be using IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN? Or is this different?

Nope, I just missed this file entirely, which is embarrassing. Whoops. Good catch.
Comment 36 Michael Catanzaro 2021-04-20 15:59:46 PDT
Created attachment 426607 [details]
Patch for landing
Comment 37 EWS 2021-04-20 17:08:22 PDT
Committed r276332 (236812@main): <https://commits.webkit.org/236812@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426607 [details].
Comment 38 Jonathan Wakely 2021-04-21 01:57:48 PDT
(In reply to Michael Catanzaro from comment #30)
> Well it was easy to try, because there's only one other place the macros
> could possibly go. In the case of the HashMap.cpp:
> 
> diff --git a/Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp
> b/Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp
> index c843e7c55ab1..1eb7b73935d5 100644
> --- a/Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp
> +++ b/Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp
> @@ -973,8 +973,9 @@ TEST(WTF_HashMap, Ref_Value)
>  
>      {
>          HashMap<int, Ref<RefLogger>> map;
> -        
> +IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN
>          auto emptyTake = map.take(1);
> +IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_END
>          ASSERT_FALSE(static_cast<bool>(emptyTake));
>      }
>  
> This didn't work unfortunately. The macros really have to go directly in
> RefPtr.h to avoid the warning.

Last time I lookedinto it, GCC does not support diagnostic pragmas around a single statement. You have to use them outside the function e.g.

IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN
     void foo()
     {
         HashMap<int, Ref<RefLogger>> map;
         auto emptyTake = map.take(1);

         ASSERT_FALSE(static_cast<bool>(emptyTake));
     }
IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_END

I don't know if Clang has the same limitation.

And that might not make any difference in this case if the pragma has to be around the location that causes the warning, not its caller.
Comment 39 Jonathan Wakely 2021-04-21 02:01:18 PDT
(In reply to Darin Adler from comment #29)
> > If you try to suppress a warning that doesn't exist, I'm pretty sure GCC is
> > going to warn, which is useful if you accidentally misspell the warning
> > name, for example. So I think IGNORE_CLANG_WARNINGS_BEGIN is really needed.
> > But if Clang is more permissive about that, then perhaps the
> > IGNORE_GCC_WARNINGS_BEGIN variant is not needed.
> 
> Yes, that explains it. Didn’t realize GCC was unique in this respect among
> the three major compilers we support. If so, maybe we should remove
> IGNORE_GCC_WARNINGS_BEGIN entirely and add it some day only if we have a
> future need for it. Many of our existing IGNORE_WARNINGS_BEGIN are
> implicitly GCC or implicitly GCC/clang and for now we don’t need to make
> this distinction.

Clang also warns if you try to disable an unsupported warning:

$ clang p.c -Wall
p.c:1:32: warning: unknown warning group '-Wnothing', ignored [-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wnothing"
                               ^


$ gcc  p.c -Wall
p.c:1:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
    1 | #pragma GCC diagnostic ignored "-Wnothing"
      |                                ^~~~~~~~~~~
Comment 40 Michael Catanzaro 2021-04-21 05:55:31 PDT
(In reply to Jonathan Wakely from comment #38)
> Last time I lookedinto it, GCC does not support diagnostic pragmas around a
> single statement. You have to use them outside the function e.g.
> 
> IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN
>      void foo()
>      {
>          HashMap<int, Ref<RefLogger>> map;
>          auto emptyTake = map.take(1);
> 
>          ASSERT_FALSE(static_cast<bool>(emptyTake));
>      }
> IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_END
> 
> I don't know if Clang has the same limitation.

Well that was true 10 years ago, but not for a long time now. It will work fine around a single statement unless you need to support very old GCC. Fortunately, we don't.

(The only remaining footgun that I know of is that the pragmas do not work at all when the warning comes from the preprocessor.)

> And that might not make any difference in this case if the pragma has to be
> around the location that causes the warning, not its caller.

Right.
Comment 41 Darin Adler 2021-04-21 16:30:14 PDT
Hi Jonathan, and welcome. Are you considering contributing to the WebKit project?
Comment 42 Michael Catanzaro 2021-04-21 19:08:23 PDT
I think he contributes C++ tips. ;)

Jonathan, I landed your static_assert proposal in r276343.
Comment 43 Jonathan Wakely 2021-04-22 03:01:55 PDT
(In reply to Michael Catanzaro from comment #42)
> I think he contributes C++ tips. ;)

Yeah, I have too many other things to juggle, sorry! I just found my way here from the Fedora bug for the bogus GCC warning.

> Jonathan, I landed your static_assert proposal in r276343.

I saw, thanks :-)
Comment 44 Darin Adler 2021-04-22 10:18:11 PDT
(In reply to Jonathan Wakely from comment #43)
> (In reply to Michael Catanzaro from comment #42)
> > I think he contributes C++ tips. ;)
> 
> Yeah, I have too many other things to juggle, sorry! I just found my way
> here from the Fedora bug for the bogus GCC warning.

No worries, I was just wondering what your plans were.

> > Jonathan, I landed your static_assert proposal in r276343.
> 
> I saw, thanks :-)

Yes, that one was great.