[Webkit-unassigned] [Bug 245321] New: Ran clang-tidy on JSC, WTF and bmalloc

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 17 11:45:13 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=245321

            Bug ID: 245321
           Summary: Ran clang-tidy on JSC, WTF and bmalloc
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mikhail at igalia.com

The following checks were used:

    * modernize-use-default-member-init
    * readability-redundant-member-init
    * modernize-use-equals-default
    * performance-trivially-destructible

    Some interesting points:

    1. No all constants were moved to move inits: stuff like UINT_MAX are
    not actually constant in the platform that I run clang-tidy (linux 64bit),
    so these had to be moved manually.
    2. modernize-use-equals-default tried to set default to constructors and
    destructors of unions, which broke compilation.
    3. Some constructros were left with an empty body so the compiler
    doesn't complain about unused variable for classes like AllowUnfinalizedAccessScope
    4. In the struct BranchTarget (DFGNode.h), a float (count) was being
    initialized using a pure NaN (double). While gcc didn't complain when it was done
    in the constructor initializer list, it started to warn about fp narrowing.
    So I manually changed the init value to use the NAN macro.
    5. Some enums were not moved from the initializer list, I'm not sure
    why. I did my best to manually move as many as I could find but is
    highly likely that a few remain.
    6. Windows doesn't seem to support default member initializer for a member of an
    anonymous struct within a union, so these had to be removed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220917/f8a1a1c0/attachment.htm>


More information about the webkit-unassigned mailing list