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

Issue 1212653005: [ADANDONED] Helper code for finding problematic uses of IntToString variants. (Closed)

Created:
5 years, 5 months ago by Adam Rice
Modified:
3 years, 4 months ago
Reviewers:
CC:
chromium-reviews, erikwright+watch_chromium.org, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@int_to_string_cleanup_net
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Helper code for finding problematic uses of IntToString variants. By defining the pre-processor symbol STRING_NUMBER_CONVERSIONS_DETECT_RISKY_CONVERSIONS a lot of extra overloads of the *Int*ToString functions are added which catch cases where a potentially unwanted implicit conversion is performed. The number of errors caught by this CL is not that large, and the errors are not usually serious, so it is probably not worth the extra complexity of checking it in. BUG=505479

Patch Set 1 #

Patch Set 2 : Template-based implementation with less false positives. #

Patch Set 3 : Handle enum arguments to IntToString(). #

Patch Set 4 : Disable warnings on IntToString's own tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -0 lines) Patch
M base/strings/string_number_conversions.h View 1 2 3 4 chunks +135 lines, -0 lines 0 comments Download
M base/strings/string_number_conversions.cc View 1 2 chunks +8 lines, -0 lines 0 comments Download
M base/strings/string_number_conversions_unittest.cc View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698