RESOLVED FIXED 211706
[clang-tidy] Run modernize-use-nullptr over JSC
https://bugs.webkit.org/show_bug.cgi?id=211706
Summary [clang-tidy] Run modernize-use-nullptr over JSC
Ross Kirsling
Reported 2020-05-10 16:44:28 PDT
[clang-tidy] Run modernize-use-nullptr over JSC
Attachments
Patch (343.44 KB, patch)
2020-05-10 16:46 PDT, Ross Kirsling
no flags
Patch for landing (318.48 KB, patch)
2020-05-10 18:53 PDT, Ross Kirsling
no flags
Ross Kirsling
Comment 1 2020-05-10 16:46:36 PDT
Darin Adler
Comment 2 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
Ross Kirsling
Comment 3 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.
Darin Adler
Comment 4 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.
Ross Kirsling
Comment 5 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.
Ross Kirsling
Comment 6 2020-05-10 18:53:29 PDT
Created attachment 398991 [details] Patch for landing
EWS
Comment 7 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].
Radar WebKit Bug Importer
Comment 8 2020-05-10 19:37:14 PDT
Note You need to log in before you can comment on or make changes to this bug.