New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776257 link

Starred by 5 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Sign in to add a comment

Run clang-tidy's modernize-* and google-* checks

Project Member Reported by w...@chromium.org, Oct 19 2017

Issue description

clang-tidy provides a number of checks that are applicable to chromium code (mostly the modernize-* and google-* ones). We should run the reliable and uncontroversial ones to improve the codebase.

Note: infrastructure to run these automatically is out of scope. See Issue 403854. Even though we can't catch regressions automatically, it's still valuable to run these once-off. Improved consistency will reduce the rate of regressions, and regressions are usually not correctness problems.
 

Comment 1 by w...@chromium.org, Oct 19 2017

kotenkov@, we can coordinate here if you like.

Comment 2 by w...@chromium.org, Oct 19 2017

I evaluated most of these checks by running them over //content/renderer (chosen arbitrarily). Results here: https://docs.google.com/spreadsheets/d/16_z3pQFvTEzQocfWpch54GSykziTxVJMEcaDb5xW0YA/comment

That's a nice doc, thanks!
I'm currently manually looking through clang-analyzer* warnings in third_party/WebKit/Source/core/ and working on nullptr conversion in other parts of Chromium.
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/75b1c3aed7e1265eab65c1fc5516ca5cfda59284

commit 75b1c3aed7e1265eab65c1fc5516ca5cfda59284
Author: Ivan Kotenkov <kotenkov@yandex-team.ru>
Date: Tue Oct 24 14:47:24 2017

Convert 0 and NULL to nullptr in components.

Steps to replicate:
1. Build clang-tidy and clang-apply-replacements as described here: https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
2. Build targets necessary for the change in out/gn.
3. Generate the compilation database:
  tools/clang/scripts/generate_compdb.py -p out/gn > compile_commands.json
4. Run clang-tidy and apply replacements:
  cd out/gn && PATH_TO_RUN_CLANG_TIDY/run-clang-tidy.py -p ../../ -clang-tidy-binary PATH_TO_CLANG_TIDY_BINARY -clang-apply-replacements-binary PATH_TO_CLANG_APPLY_REPLACEMENTS_BINARY -checks=-*,modernize-use-nullptr -fix -j 8 DIR_TO_CONVERT

Bug: 403854, 776257
Change-Id: Ifd0c147ac6866beacffbddb0c56b20502cb4f127
Reviewed-on: https://chromium-review.googlesource.com/732308
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Ivan Kotenkov <kotenkov@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#511144}
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/app_modal/app_modal_dialog_queue.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/content/browser/content_autofill_driver.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/content/browser/risk/fingerprint.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/content/browser/risk/fingerprint_browsertest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/content/renderer/form_autofill_util.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/content/renderer/password_form_conversion_utils.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/address_field.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/address_i18n_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/autocomplete_history_manager.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/autofill_external_delegate_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/autofill_manager.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/autofill_manager_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/autofill_profile.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/autofill_profile_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/credit_card_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/email_field.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/form_structure.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/name_field.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/personal_data_manager_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/phone_number.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/phone_number_i18n.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/test_autofill_driver.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/webdata/autofill_data_type_controller_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/webdata/autofill_profile_syncable_service_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/autofill/core/browser/webdata/web_data_service_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_codec_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_index_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_model.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_model_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_node_data.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_node_data_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_storage.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/bookmark_utils.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/browser/titled_url_match.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/managed/managed_bookmarks_tracker.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/browser_sync/test_http_bridge_factory.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/browsing_data/content/conditional_cache_counting_helper.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/captive_portal/captive_portal_detector.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/captive_portal/captive_portal_detector_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/captive_portal/captive_portal_testing_utils.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/cloud_devices/common/cloud_device_description.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/cloud_devices/common/printer_description.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/component_updater/component_updater_service.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/constrained_window/native_web_contents_modal_dialog_manager_views.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/content_settings/core/browser/content_settings_default_provider.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/content_settings/core/browser/content_settings_pref_provider.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/content_settings/core/browser/content_settings_provider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/content_settings/core/browser/content_settings_usages_state.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/content_settings/core/browser/host_content_settings_map.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/content_settings/core/test/content_settings_test_utils.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/crash/content/app/crash_reporter_client.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/crash/content/browser/crash_handler_host_linux.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/crash/core/common/crash_keys_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/cryptauth/cryptauth_api_call_flow_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/content/browser/content_lofi_decider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/content/browser/content_resource_type_provider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_mutable_config_values_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/device_event_log/device_event_log.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/content/browser/distiller_page_web_contents.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/content/browser/test/dom_distiller_js_browsertest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/content/browser/web_contents_main_frame_observer.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/distiller_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/distiller_url_fetcher_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/dom_distiller_model.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/dom_distiller_model_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/dom_distiller_request_view_base_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/dom_distiller_service.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/dom_distiller_service_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/dom_distiller_store.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/dom_distiller_store_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/task_tracker_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/viewer.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/core/viewer_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/dom_distiller/webui/dom_distiller_handler.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/download/content/public/all_download_item_notifier.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/drive/drive_notification_manager.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/drive/drive_uploader_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/drive/file_change.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/drive/file_system_core_util.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/drive/service/fake_drive_service.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/favicon_base/favicon_util.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/favicon_base/select_favicon_frames.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/favicon_base/select_favicon_frames_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/feedback/feedback_uploader_dispatch_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/feedback/tracing_manager.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/fake_gcm_client.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/fake_gcm_driver.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/gcm_account_mapper.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/gcm_account_tracker_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/gcm_client_impl.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/gcm_driver_desktop.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/gcm_internals_helper.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/gcm_stats_recorder_impl.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/gcm_driver/registration_info.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/google/core/browser/google_url_tracker_client.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/guest_view/browser/test_guest_view_manager.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/history_backend_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/history_service_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/history_types.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/history_types_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/in_memory_history_backend.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/thumbnail_database_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/top_sites_backend.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/top_sites_database.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/typed_url_sync_bridge.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/typed_url_sync_bridge_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/typed_url_syncable_service.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/browser/typed_url_syncable_service_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/history/core/test/history_unittest_base.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/infobars/core/infobar.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/infobars/core/infobar_container.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/infobars/core/infobar_manager.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/fake_invalidation_service.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/gcm_invalidation_bridge.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/gcm_network_channel_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/non_blocking_invalidator.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/non_blocking_invalidator_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/p2p_invalidation_service.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/p2p_invalidator.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/p2p_invalidator_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/push_client_channel_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/sync_invalidation_listener.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/sync_invalidation_listener_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/ticl_invalidation_service.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/ticl_invalidation_service_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/invalidation/impl/unacked_invalidation_set.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/json_schema/json_schema_validator.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/json_schema/json_schema_validator_unittest_base.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/keyed_service/content/browser_context_dependency_manager_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/keyed_service/content/browser_context_keyed_base_factory.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/leveldb/env_mojo.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/login/base_screen_handler_utils.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/metrics/metrics_log_manager_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/metrics/net/net_metrics_log_uploader_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/metrics/serialization/serialization_utils_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/offline_pages/content/background_loader/background_loader_contents_stub.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/offline_pages/core/prefetch/prefetch_network_request_factory_impl_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/autocomplete_input.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/autocomplete_match.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/autocomplete_match_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/autocomplete_result.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/autocomplete_result_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/base_search_provider.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/builtin_provider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/history_quick_provider.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/history_quick_provider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/history_url_provider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/in_memory_url_index.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/keyword_provider.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/keyword_provider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/omnibox_field_trial_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/omnibox_popup_model.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/physical_web_provider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/search_provider.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/search_suggestion_parser.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/shortcuts_backend.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/shortcuts_backend_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/shortcuts_database_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/browser/shortcuts_provider_unittest.cc
[modify] https://crrev.com/75b1c3aed7e1265eab65c1fc5516ca5cfda59284/components/omnibox/br
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05d575432d1f675179d87f8ec61cfa7405a7b090

commit 05d575432d1f675179d87f8ec61cfa7405a7b090
Author: Ivan Kotenkov <kotenkov@yandex-team.ru>
Date: Wed Oct 25 06:47:00 2017

Convert 0 and NULL to nullptr in cc using clang-tidy.

Steps to replicate:
1. Build clang-tidy and clang-apply-replacements as described here: https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
2. Build targets necessary for the change in out/gn.
3. Generate the compilation database:
  tools/clang/scripts/generate_compdb.py -p out/gn > compile_commands.json
4. Run clang-tidy and apply replacements:
  cd out/gn && PATH_TO_RUN_CLANG_TIDY/run-clang-tidy.py -p ../../ -clang-tidy-binary PATH_TO_CLANG_TIDY_BINARY -clang-apply-replacements-binary PATH_TO_CLANG_APPLY_REPLACEMENTS_BINARY -checks=-*,modernize-use-nullptr -fix -j 8 DIR_TO_CONVERT

Bug: 403854, 776257
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I685c4bbe76669dfa36994f5ae3fcb6e54350982a
Reviewed-on: https://chromium-review.googlesource.com/732304
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Ivan Kotenkov <kotenkov@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#511396}
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/animation/transform_operations.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/base/filter_operations.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/base/filter_operations_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/base/list_container_helper.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/base/render_surface_filters.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/blink/web_layer_impl.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/ipc/cc_param_traits.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/layers/heads_up_display_layer_impl.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/layers/heads_up_display_layer_impl_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/layers/heads_up_display_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/raster/task_graph_work_queue.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/resources/video_resource_updater.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/test/fake_layer_tree_host.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/test/fake_picture_layer_impl.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/test/fake_video_frame_provider.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/test/layer_tree_json_parser.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/test/layer_tree_json_parser_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/test/layer_tree_pixel_test.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/test/layer_tree_test.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/test/test_web_graphics_context_3d.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/tiles/picture_layer_tiling.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/tiles/picture_layer_tiling_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/damage_tracker_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host_common.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host_unittest_animation.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host_unittest_context.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host_unittest_copyrequest.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_host_unittest_scroll.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/layer_tree_impl.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/occlusion_tracker.cc
[modify] https://crrev.com/05d575432d1f675179d87f8ec61cfa7405a7b090/cc/trees/tree_synchronizer_unittest.cc

Comment 6 by w...@chromium.org, Oct 27 2017

Blockedon: 778942

Comment 7 by w...@chromium.org, Oct 27 2017

Blockedon: 778946

Comment 8 by w...@chromium.org, Oct 27 2017

Blockedon: 778949

Comment 9 by w...@chromium.org, Oct 27 2017

Blockedon: 778950

Comment 10 by w...@chromium.org, Oct 27 2017

Blockedon: 778955

Comment 11 by w...@chromium.org, Oct 27 2017

Blockedon: 778957

Comment 12 by w...@chromium.org, Oct 27 2017

Blockedon: 778959

Comment 13 by w...@chromium.org, Oct 27 2017

Blockedon: 778963

Comment 14 by w...@chromium.org, Oct 27 2017

To avoid spamming this bug with CLs I created bugs for checks from the spreadsheet that are agreed upon and which don't require modification/manual changes. I'll do use-{delete,default}. 
Project Member

Comment 15 by bugdroid1@chromium.org, Nov 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a16212a56df0ed74f3f1e3029563e57d53f8c031

commit a16212a56df0ed74f3f1e3029563e57d53f8c031
Author: Ivan Kotenkov <kotenkov@yandex-team.ru>
Date: Wed Nov 08 12:37:33 2017

Convert NULL and 0 to nullptr in base using clang-tidy.

Steps to replicate:
1. Build clang-tidy and clang-apply-replacements as described here: https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
2. Build targets necessary for the change in out/gn.
3. Generate the compilation database:
  tools/clang/scripts/generate_compdb.py -p out/gn > compile_commands.json
4. Run clang-tidy and apply replacements:
  cd out/gn && PATH_TO_RUN_CLANG_TIDY/run-clang-tidy.py -p ../../ -clang-tidy-binary PATH_TO_CLANG_TIDY_BINARY -clang-apply-replacements-binary PATH_TO_CLANG_APPLY_REPLACEMENTS_BINARY -checks=-*,modernize-use-nullptr -fix -j 8 DIR_TO_CONVERT

Bug: 403854, 776257
Change-Id: I920f43d09b9fab758a3b8663fcf0c405d8519ad4
Reviewed-on: https://chromium-review.googlesource.com/732105
Commit-Queue: Ivan Kotenkov <kotenkov@yandex-team.ru>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514808}
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/allocator/allocator_shim.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/allocator/partition_allocator/page_allocator.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/allocator/partition_allocator/partition_alloc.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/allocator/partition_allocator/partition_alloc_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/allocator/tcmalloc_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/at_exit.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/at_exit_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/command_line.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/command_line_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/containers/linked_list_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/containers/stack_container_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/debug/crash_logging.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/debug/crash_logging_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/debug/dump_without_crashing.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/debug/profiler.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/debug/stack_trace.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/debug/stack_trace_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/environment_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/file_path.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/file_path_watcher_linux.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/file_path_watcher_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/file_proxy.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/file_proxy_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/file_util.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/file_util_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/file_util_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/memory_mapped_file.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/files/memory_mapped_file_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/i18n/bidi_line_iterator.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/i18n/break_iterator.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/i18n/case_conversion.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/i18n/icu_string_conversions.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/i18n/icu_string_conversions_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/i18n/rtl.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/i18n/string_search.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/i18n/string_search_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/json/json_file_value_serializer.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/json/json_value_converter_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/json/json_writer.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/lazy_instance_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/linux_util.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/logging_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/aligned_memory.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/linked_ptr_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/ref_counted_memory.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/ref_counted_memory_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/shared_memory_helper.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/shared_memory_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/shared_memory_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/singleton_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/memory/weak_ptr.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/message_loop/message_loop.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/message_loop/message_loop_task_runner_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/message_loop/message_loop_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/message_loop/message_pump_glib.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/message_loop/message_pump_glib_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/message_loop/message_pump_libevent.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/message_loop/message_pump_libevent_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/field_trial.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/field_trial_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/histogram_base.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/histogram_delta_serialization.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/histogram_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/persistent_memory_allocator.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/persistent_sample_map_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/sample_map_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/sample_vector.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/sparse_histogram.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/metrics/statistics_recorder_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/nix/xdg_util.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/path_service.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/pickle.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/pickle_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/posix/safe_strerror.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/posix/unix_domain_socket.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/posix/unix_domain_socket_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/power_monitor/power_monitor.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/kill_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/launch_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/memory.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/memory_linux.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/memory_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/process_iterator.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/process_iterator_linux.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/process_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/process_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/process/process_util_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/scoped_native_library.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/security_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/strings/pattern.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/strings/safe_sprintf.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/strings/safe_sprintf_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/strings/string16.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/strings/string_number_conversions.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/strings/string_number_conversions_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/strings/string_piece_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/strings/sys_string_conversions_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/supports_user_data_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/synchronization/condition_variable_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/synchronization/waitable_event_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/synchronization/waitable_event_watcher_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/system_monitor/system_monitor.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/gtest_xml_unittest_result_printer.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/gtest_xml_util.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/launcher/test_launcher.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/launcher/test_results_tracker.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/perf_log.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/scoped_locale.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/sequenced_worker_pool_owner.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/test_file_util_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/trace_event_analyzer.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/trace_event_analyzer_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/test/values_test_util.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/threading/platform_thread_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/threading/sequenced_worker_pool.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/threading/simple_thread.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/threading/thread_id_name_manager.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/threading/thread_local_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/threading/thread_perftest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/threading/thread_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/time/time.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/time/time_exploded_posix.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/time/time_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/trace_event/trace_buffer.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/trace_event/trace_event_impl.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/trace_event/trace_event_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/trace_event/trace_log.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/values.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/values_unittest.cc
[modify] https://crrev.com/a16212a56df0ed74f3f1e3029563e57d53f8c031/base/vlog.cc

Sorry about the spam, forgot to change the description of the CL.
Labels: Hotlist-CodeHealth
Project Member

Comment 19 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/646257d65c653acdf2bea96c69e0550ca03340c6

commit 646257d65c653acdf2bea96c69e0550ca03340c6
Author: Dan Sinclair <dsinclair@chromium.org>
Date: Thu Nov 30 16:41:51 2017

Run clang-tidy google-readability-casting on //third_party/pdfium

See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8

This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md

Bug: chromium:776257
Change-Id: Iebab34f3ee97a6249e4517d1f5dec1971c36fcba
Reviewed-on: https://pdfium-review.googlesource.com/19973
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>

[modify] https://crrev.com/646257d65c653acdf2bea96c69e0550ca03340c6/core/fxge/dib/cfx_dibsource.h

Comment 20 by w...@chromium.org, Feb 1 2018

Cc: w...@chromium.org
Owner: ----
Status: Available (was: Started)
I'm switching teams so won't have time to finish this but I'll leave it open, just in case anyone else comes across it and cares enough about style to pick it up :)

I've run clang-tidy on libyuv and run into a few issues

1. enabling it on Visual C produces multiple issues.
clang-tidy -fix-errors -checks=-*,readability-inconsistent-declaration-parameter-name $* -- -Iinclude -D_MSC_VER=1600 -D_M_IX86
a. win32 fseeks get changed to linux
b. typedefs for int64 get corrupted with ; in middle.
c. declspecs get corrupted

2. android-* added 'e' for fopen()?  is that portable?

3. modernize-* assumes c++11.  Can the language be specified?  I'm actually doing C, not C++.

4. readability-non-const-parameter changes pointers to const that are written into with assembly
https://bugs.chromium.org/p/libyuv/issues/detail?id=775


For libyuv I wrote 2 scripts: tidyyuv and tidycc.  tidyyuv runs tidycc on all the source files.
tidycc applies all the safe options and runs clang-tidy once for each configuration.  This is necessary to catch all the ifdef'ed code.

tidyyuv:
~/bin/tidycc source/*.cc 
~/bin/tidycc util/*.cc 
~/bin/tidycc unit_test/*.cc 


tidycc:
warnings=-*,mpi-*,objc-*,llvm-*,llvm-*,-hicpp-deprecated-headers,-hicpp-use-auto,bugprone-*,cert-*,google-*,-google-readability-casting,misc-*,,-misc-unused-parameters,-misc-macro-parentheses,cppcoreguidelines-*,-cppcoreguidelines-pro-type-member-init,readability-*,-readability-non-const-parameter,-readability-implicit-bool-conversion,fuchsia-*,-fuchsia-multiple-inheritance,-android-cloexec-*

~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__ARM_NEON__ -D__arm__   -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__mips_msa               -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__aarch64__              -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D_MSC_VER=1600 -D_M_IX86  -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D_MSC_VER=1600 -D_M_X64   -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__i386__                 -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__x86_64__               -D__clang__ -D__clang_major__=6 -DHAVE_JPEG



Blockedon: 890902

Comment 24 Deleted

Blockedon: 895746
Blockedon: -895504
Status: Untriaged (was: Available)
Available, but no owner or component? Please find a component, as no one will ever find this without one.

Sign in to add a comment