Bug 211706

Summary: [clang-tidy] Run modernize-use-nullptr over JSC
Product: WebKit Reporter: Ross Kirsling <ross.kirsling>
Component: New BugsAssignee: Ross Kirsling <ross.kirsling>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Ross Kirsling 2020-05-10 16:44:28 PDT
[clang-tidy] Run modernize-use-nullptr over JSC
Comment 1 Ross Kirsling 2020-05-10 16:46:36 PDT
Created attachment 398987 [details]
Patch
Comment 2 Darin Adler 2020-05-10 16:48:45 PDT
Comment on attachment 398987 [details]
Patch

Looks fine. rs=me if there isn’t a mistake here somewhere that breaks compilation
Comment 3 Ross Kirsling 2020-05-10 16:50:25 PDT
Thanks!

For the record, this patch is the result of running the following command:
  run-clang-tidy.py Source/JavaScriptCore -fix -checks="-*,modernize-use-nullptr" -header-filter="Source/*"`

None of changes under the API subdirectory are to C header declarations, so everything appears to be safe here.
Comment 4 Darin Adler 2020-05-10 16:55:13 PDT
Comment on attachment 398987 [details]
Patch

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

> Source/JavaScriptCore/parser/Parser.cpp:2251
> -                context.appendParameter(parameterList, parameter, 0);
> +                context.appendParameter(parameterList, parameter, nullptr);

EWS failures are about code like this. This is template code and the SyntaxChecker.h use of it will need to be changed. It uses int for this, and could instead use void* or virtually any pointer type.
Comment 5 Ross Kirsling 2020-05-10 18:39:05 PDT
(In reply to Darin Adler from comment #4)
> Comment on attachment 398987 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=398987&action=review
> 
> > Source/JavaScriptCore/parser/Parser.cpp:2251
> > -                context.appendParameter(parameterList, parameter, 0);
> > +                context.appendParameter(parameterList, parameter, nullptr);
> 
> EWS failures are about code like this. This is template code and the
> SyntaxChecker.h use of it will need to be changed. It uses int for this, and
> could instead use void* or virtually any pointer type.

I think I'll split that out into a second patch just to keep this one fully-automated.
Comment 6 Ross Kirsling 2020-05-10 18:53:29 PDT
Created attachment 398991 [details]
Patch for landing
Comment 7 EWS 2020-05-10 19:36:12 PDT
Committed r261464: <https://trac.webkit.org/changeset/261464>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398991 [details].
Comment 8 Radar WebKit Bug Importer 2020-05-10 19:37:14 PDT
<rdar://problem/63073140>