Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Issue 798333005: tools/gn: Pass clang-modernize -use-nullptr over it. (Closed)

Created:
6 years ago by tfarina
Modified:
6 years ago
Reviewers:
brettw
CC:
chromium-reviews, tfarina, rginda+watch_chromium.org, Dirk Pranke, scottmg
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

tools/gn: convert NULL to nullptr all over it. nullptr is one of the C++11 allowed features. See https://chromium-cpp.appspot.com/ and https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/4mijeJHzxLg. This patch was generated with the following command lines: $ ninja -C out/Debug -t compdb cxx > out/Debug/compile_commands.json $ cd out/Debug $ find ../../tools/gn -name '*.cc' | xargs -n 16 -P 32 \ ~/src/repos/llvm/build/bin/clang-modernize -use-nullptr -p . -include \ tools/gn -format -style=Chromium $ ninja gn gn_unittests BUG=None TEST=compiles + gn_unittests R=brettw@chromium.org Committed: https://crrev.com/9b636af5b67940f73aa43180b265d41ca6545167 Cr-Commit-Position: refs/heads/master@{#309505}

Patch Set 1 #

Total comments: 8

Patch Set 2 : address Brett's review - revert some clang-format changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+377 lines, -362 lines) Patch
M tools/gn/args.cc View 4 chunks +9 lines, -9 lines 0 comments Download
M tools/gn/builder.cc View 5 chunks +8 lines, -8 lines 0 comments Download
M tools/gn/builder_record.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/builder_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/command_desc.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/command_format.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M tools/gn/command_refs.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M tools/gn/commands.cc View 1 4 chunks +8 lines, -8 lines 0 comments Download
M tools/gn/escape.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/escape_unittest.cc View 5 chunks +7 lines, -7 lines 0 comments Download
M tools/gn/exec_process.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M tools/gn/filesystem_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/filesystem_utils_unittest.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M tools/gn/function_foreach.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/function_get_label_info_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/gn/function_get_path_info_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/gn/function_get_target_outputs.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/function_get_target_outputs_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/function_process_file_template_unittest.cc View 2 chunks +13 lines, -13 lines 0 comments Download
M tools/gn/function_rebase_path_unittest.cc View 2 chunks +8 lines, -8 lines 0 comments Download
M tools/gn/function_set_default_toolchain.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/function_toolchain.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M tools/gn/function_write_file_unittest.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M tools/gn/functions.cc View 5 chunks +18 lines, -18 lines 0 comments Download
M tools/gn/functions_unittest.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M tools/gn/import_manager.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/input_conversion_unittest.cc View 10 chunks +27 lines, -26 lines 0 comments Download
M tools/gn/input_file_manager.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/item.cc View 1 chunk +19 lines, -9 lines 0 comments Download
M tools/gn/label.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M tools/gn/label_pattern_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/label_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/loader.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/location.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/ninja_action_target_writer_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/ninja_build_writer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/gn/ninja_copy_target_writer.cc View 1 chunk +10 lines, -10 lines 0 comments Download
M tools/gn/operators_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/gn/parse_tree.cc View 1 2 chunks +12 lines, -12 lines 0 comments Download
M tools/gn/parse_tree_unittest.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M tools/gn/parser.cc View 6 chunks +39 lines, -39 lines 0 comments Download
M tools/gn/pattern.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/scheduler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/gn/scope.cc View 11 chunks +19 lines, -18 lines 0 comments Download
M tools/gn/scope_per_file_provider.cc View 6 chunks +18 lines, -12 lines 0 comments Download
M tools/gn/scope_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/gn/string_utils_unittest.cc View 3 chunks +10 lines, -10 lines 0 comments Download
M tools/gn/substitution_list.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/substitution_pattern.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/gn/substitution_pattern_unittest.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M tools/gn/substitution_type.cc View 1 chunk +36 lines, -36 lines 0 comments Download
M tools/gn/substitution_writer_unittest.cc View 4 chunks +6 lines, -7 lines 0 comments Download
M tools/gn/target.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/template.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/test_with_scope.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/trace.cc View 3 chunks +4 lines, -6 lines 0 comments Download
M tools/gn/value.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/value_unittest.cc View 3 chunks +9 lines, -9 lines 0 comments Download
M tools/gn/visibility_unittest.cc View 3 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
tfarina
Brett, is this OK?
6 years ago (2014-12-21 02:18:34 UTC) #1
brettw
Can you change the commit message a bit to say this changes NULL -> nullptr ...
6 years ago (2014-12-21 17:00:41 UTC) #2
tfarina
CL description updated. Pushing to CQ. https://codereview.chromium.org/798333005/diff/1/tools/gn/commands.cc File tools/gn/commands.cc (right): https://codereview.chromium.org/798333005/diff/1/tools/gn/commands.cc#newcode17 tools/gn/commands.cc:17: : help_short(nullptr), help(nullptr), ...
6 years ago (2014-12-23 00:06:44 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/798333005/20001
6 years ago (2014-12-23 00:09:00 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
6 years ago (2014-12-23 00:52:37 UTC) #6
commit-bot: I haz the power
6 years ago (2014-12-23 00:53:17 UTC) #7
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9b636af5b67940f73aa43180b265d41ca6545167
Cr-Commit-Position: refs/heads/master@{#309505}

Powered by Google App Engine
This is Rietveld 408576698