Bug 231672 - CLang build warning in CheckedPtr.h
Summary: CLang build warning in CheckedPtr.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-13 06:15 PDT by Philippe Normand
Modified: 2021-10-13 07:34 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.59 KB, patch)
2021-10-13 06:21 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (1.59 KB, patch)
2021-10-13 06:39 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (1.59 KB, patch)
2021-10-13 06:39 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2021-10-13 06:15:39 PDT
/app/webkit/WebKitBuild/Debug/WTF/Headers/wtf/CheckedPtr.h:108:52: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
    inline const T& operator*() const { do { if (!(this)) { WTFReportAssertionFailure("/app/webkit/WebKitBuild/Debug/WTF/Headers/wtf/CheckedPtr.h", 108, __PRETTY_FUNCTION__, "this"); do { WTF::isIntegralOrPointerType(); compilerFenceForCrash(); WTFCrashWithInfo(108, "/app/webkit/WebKitBuild/Debug/WTF/Headers/wtf/CheckedPtr.h", __PRETTY_FUNCTION__, 2989); } while (false); } } while (0); return *get(); }
                                                 ~ ^~~~
/app/webkit/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.h:74:51: note: in instantiation of member function 'WTF::CheckedPtr<const WebCore::LayoutIntegration::LineLayout>::operator*' requested here
    const LineLayout& lineLayout() const { return *m_lineLayout; }
                                                  ^
2 warnings generated.
Comment 1 Philippe Normand 2021-10-13 06:21:52 PDT
Created attachment 441065 [details]
Patch
Comment 2 Philippe Normand 2021-10-13 06:39:31 PDT
Created attachment 441068 [details]
Patch
Comment 3 Philippe Normand 2021-10-13 06:39:58 PDT
Created attachment 441069 [details]
Patch
Comment 4 EWS 2021-10-13 07:33:13 PDT
Committed r284092 (242920@main): <https://commits.webkit.org/242920@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 441069 [details].
Comment 5 Radar WebKit Bug Importer 2021-10-13 07:34:17 PDT
<rdar://problem/84197572>