Bug 211706 - [clang-tidy] Run modernize-use-nullptr over JSC
Summary: [clang-tidy] Run modernize-use-nullptr over JSC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-10 16:44 PDT by Ross Kirsling
Modified: 2020-05-10 19:37 PDT (History)
8 users (show)

See Also:


Attachments
Patch (343.44 KB, patch)
2020-05-10 16:46 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch for landing (318.48 KB, patch)
2020-05-10 18:53 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>