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

Issue 656703002: Convert NULL to nullptr (Closed)

Created:
6 years, 2 months ago by Mark Mentovai
Modified:
6 years, 2 months ago
Reviewers:
Robert Sesek
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Project:
crashpad
Visibility:
Public.

Description

Convert NULL to nullptr. This change was generated mechanically by running: find . \( -name \*.cc -or -name \*.mm -or -name \*.h \) \ -and -not -path ./third_party/\* -and -not -path ./out/\* \ -exec sed -i '' -E -e 's/(^|[^_])NULL/\1nullptr/g' {} + Further manual fix-ups were applied to remove casts of nullptr to other pointer types where possible, to preserve the intentional use of NULL (as a short form of MACH_PORT_NULL) in exception_port_tool, and to fix 80-column violations. https://groups.google.com/a/chromium.org/d/topic/chromium-dev/4mijeJHzxLg/discussion TEST=*_test R=rsesek@chromium.org Committed: https://chromium.googlesource.com/crashpad/crashpad/+/5d74f120fc5797135d42f6bebf9ab80c49cc4a70

Patch Set 1 : sed -i '' -E -e 's/(^|[^_])NULL/\1nullptr/g' #

Patch Set 2 : Don’t cast nullptr to other pointer types where unnecessary #

Patch Set 3 : Fix exception_port_tool #

Patch Set 4 : Fix 80-column violations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -319 lines) Patch
M client/simple_string_dictionary.h View 1 2 3 8 chunks +17 lines, -17 lines 0 comments Download
M client/simple_string_dictionary_test.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M compat/mac/mach-o/getsect.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M minidump/minidump_exception_writer.cc View 1 chunk +1 line, -1 line 0 comments Download
M minidump/minidump_module_writer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M minidump/minidump_module_writer_test.cc View 1 2 3 7 chunks +15 lines, -15 lines 0 comments Download
M minidump/minidump_string_writer_test.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M minidump/minidump_thread_writer.h View 1 chunk +1 line, -1 line 0 comments Download
M minidump/minidump_thread_writer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M minidump/minidump_thread_writer_test.cc View 1 2 3 5 chunks +9 lines, -9 lines 0 comments Download
M snapshot/cpu_context_mac.h View 1 2 3 2 chunks +10 lines, -10 lines 0 comments Download
M snapshot/cpu_context_mac_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M snapshot/exception_snapshot_mac.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M snapshot/memory_snapshot_mac.cc View 1 chunk +1 line, -1 line 0 comments Download
M snapshot/process_snapshot.h View 1 chunk +1 line, -1 line 0 comments Download
M snapshot/system_snapshot_mac.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M snapshot/system_snapshot_mac_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M snapshot/thread_snapshot_mac.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/catch_exception_tool.cc View 2 chunks +10 lines, -10 lines 0 comments Download
M tools/exception_port_tool.cc View 1 2 3 chunks +16 lines, -16 lines 0 comments Download
M tools/on_demand_service_tool.mm View 1 2 3 2 chunks +10 lines, -9 lines 0 comments Download
M util/mac/launchd.h View 1 chunk +1 line, -1 line 0 comments Download
M util/mac/launchd.mm View 4 chunks +5 lines, -5 lines 0 comments Download
M util/mac/mac_util.h View 1 chunk +1 line, -1 line 0 comments Download
M util/mac/mac_util.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M util/mac/mach_o_image_reader.h View 1 2 3 5 chunks +22 lines, -21 lines 0 comments Download
M util/mac/mach_o_image_reader.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M util/mac/mach_o_image_reader_test.cc View 1 2 3 8 chunks +23 lines, -19 lines 0 comments Download
M util/mac/mach_o_image_segment_reader.h View 1 2 3 3 chunks +7 lines, -7 lines 0 comments Download
M util/mac/mach_o_image_segment_reader.cc View 1 chunk +1 line, -1 line 0 comments Download
M util/mac/mach_o_image_symbol_table_reader.h View 2 chunks +2 lines, -2 lines 0 comments Download
M util/mac/mach_o_image_symbol_table_reader.cc View 1 chunk +1 line, -1 line 0 comments Download
M util/mac/process_reader.cc View 1 2 3 4 chunks +5 lines, -5 lines 0 comments Download
M util/mac/process_reader_test.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M util/mac/service_management.cc View 1 chunk +1 line, -1 line 0 comments Download
M util/mach/exc_client_variants.h View 1 chunk +1 line, -1 line 0 comments Download
M util/mach/exc_client_variants.cc View 1 chunk +1 line, -1 line 0 comments Download
M util/mach/exc_client_variants_test.cc View 1 3 chunks +8 lines, -8 lines 0 comments Download
M util/mach/exc_server_variants.h View 1 chunk +2 lines, -2 lines 0 comments Download
M util/mach/exc_server_variants.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M util/mach/exc_server_variants_test.cc View 1 2 3 7 chunks +64 lines, -64 lines 0 comments Download
M util/mach/exception_ports.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M util/mach/exception_ports_test.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M util/mach/mach_message_server.cc View 1 chunk +1 line, -1 line 0 comments Download
M util/mach/symbolic_constants_mach.cc View 6 chunks +10 lines, -10 lines 0 comments Download
M util/mach/symbolic_constants_mach_test.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M util/mach/task_memory.h View 1 chunk +1 line, -1 line 0 comments Download
M util/posix/process_util_mac.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M util/posix/symbolic_constants_posix.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M util/posix/symbolic_constants_posix_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M util/synchronization/semaphore_test.cc View 1 2 3 4 chunks +6 lines, -5 lines 0 comments Download
M util/test/executable_path_mac.cc View 1 chunk +1 line, -1 line 0 comments Download
M util/test/mac/mach_multiprocess.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M util/test/multiprocess.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M util/test/multiprocess_exec.h View 1 chunk +1 line, -1 line 0 comments Download
M util/test/multiprocess_exec.cc View 1 chunk +1 line, -1 line 0 comments Download
M util/test/multiprocess_exec_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M util/test/posix/close_multiple.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (1 generated)
Mark Mentovai
6 years, 2 months ago (2014-10-14 03:56:09 UTC) #2
Robert Sesek
LGTM. This thread discusses using just "null" in comments instead of "nullptr". I kind of ...
6 years, 2 months ago (2014-10-14 13:51:26 UTC) #3
Mark Mentovai
It’s pedantic, but given the documentation style in Crashpad, I could see justifications for using ...
6 years, 2 months ago (2014-10-14 14:04:54 UTC) #4
Mark Mentovai
6 years, 2 months ago (2014-10-14 15:10:53 UTC) #5
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
5d74f120fc5797135d42f6bebf9ab80c49cc4a70 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698