Commit 98c9b243 authored by George Burgess IV's avatar George Burgess IV Committed by Commit Bot

fix instances of bugprone-argument-comment

This new clang-tidy check complains when param names /*in_comments=*/
don't match up with the actual parameter name they're being passed to.
Sometimes this is benign, other times, actual bugs are found.

Bug: 1136209
Change-Id: Ib72fae06192b4fea7f9e87bf6a4f55bd50c136b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2459187Reviewed-by: default avatarJesse Doherty <jwd@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817307}
parent 2ee5e037
...@@ -400,10 +400,10 @@ TEST_P(SparseHistogramTest, HistogramNameHash) { ...@@ -400,10 +400,10 @@ TEST_P(SparseHistogramTest, HistogramNameHash) {
TEST_P(SparseHistogramTest, CheckGetCountAndBucketData) { TEST_P(SparseHistogramTest, CheckGetCountAndBucketData) {
std::unique_ptr<SparseHistogram> histogram(NewSparseHistogram("Sparse")); std::unique_ptr<SparseHistogram> histogram(NewSparseHistogram("Sparse"));
// Add samples in reverse order and make sure the output is in correct order. // Add samples in reverse order and make sure the output is in correct order.
histogram->AddCount(/*sample=*/200, /*value=*/15); histogram->AddCount(/*sample=*/200, /*count=*/15);
histogram->AddCount(/*sample=*/100, /*value=*/5); histogram->AddCount(/*sample=*/100, /*count=*/5);
// Add samples to the same bucket and make sure they'll be aggregated. // Add samples to the same bucket and make sure they'll be aggregated.
histogram->AddCount(/*sample=*/100, /*value=*/5); histogram->AddCount(/*sample=*/100, /*count=*/5);
base::Histogram::Count total_count; base::Histogram::Count total_count;
int64_t sum; int64_t sum;
...@@ -438,8 +438,8 @@ TEST_P(SparseHistogramTest, CheckGetCountAndBucketData) { ...@@ -438,8 +438,8 @@ TEST_P(SparseHistogramTest, CheckGetCountAndBucketData) {
TEST_P(SparseHistogramTest, WriteAscii) { TEST_P(SparseHistogramTest, WriteAscii) {
HistogramBase* histogram = HistogramBase* histogram =
SparseHistogram::FactoryGet("AsciiOut", HistogramBase::kNoFlags); SparseHistogram::FactoryGet("AsciiOut", HistogramBase::kNoFlags);
histogram->AddCount(/*sample=*/4, /*value=*/5); histogram->AddCount(/*sample=*/4, /*count=*/5);
histogram->AddCount(/*sample=*/10, /*value=*/15); histogram->AddCount(/*sample=*/10, /*count=*/15);
std::string output; std::string output;
histogram->WriteAscii(&output); histogram->WriteAscii(&output);
...@@ -455,8 +455,8 @@ TEST_P(SparseHistogramTest, WriteAscii) { ...@@ -455,8 +455,8 @@ TEST_P(SparseHistogramTest, WriteAscii) {
TEST_P(SparseHistogramTest, ToGraphDict) { TEST_P(SparseHistogramTest, ToGraphDict) {
HistogramBase* histogram = HistogramBase* histogram =
SparseHistogram::FactoryGet("HTMLOut", HistogramBase::kNoFlags); SparseHistogram::FactoryGet("HTMLOut", HistogramBase::kNoFlags);
histogram->AddCount(/*sample=*/4, /*value=*/5); histogram->AddCount(/*sample=*/4, /*count=*/5);
histogram->AddCount(/*sample=*/10, /*value=*/15); histogram->AddCount(/*sample=*/10, /*count=*/15);
base::DictionaryValue output = histogram->ToGraphDict(); base::DictionaryValue output = histogram->ToGraphDict();
std::string* header = output.FindStringKey("header"); std::string* header = output.FindStringKey("header");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment