fix clang-tidy warnings (#1195)
diff --git a/test/benchmark_random_interleaving_gtest.cc b/test/benchmark_random_interleaving_gtest.cc index f68c680..88e274e 100644 --- a/test/benchmark_random_interleaving_gtest.cc +++ b/test/benchmark_random_interleaving_gtest.cc
@@ -34,7 +34,7 @@ } }; -static EventQueue* queue = new EventQueue; +EventQueue* queue = new EventQueue(); class NullReporter : public BenchmarkReporter { public: @@ -60,7 +60,7 @@ } }; -static void BM_Match1(benchmark::State& state) { +void BM_Match1(benchmark::State& state) { const int64_t arg = state.range(0); for (auto _ : state) {
diff --git a/test/perf_counters_test.cc b/test/perf_counters_test.cc index d6e0284..3017a45 100644 --- a/test/perf_counters_test.cc +++ b/test/perf_counters_test.cc
@@ -5,7 +5,7 @@ #include "benchmark/benchmark.h" #include "output_test.h" -void BM_Simple(benchmark::State& state) { +static void BM_Simple(benchmark::State& state) { for (auto _ : state) { benchmark::DoNotOptimize(state.iterations()); } @@ -13,7 +13,7 @@ BENCHMARK(BM_Simple); ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_Simple\",$"}}); -void CheckSimple(Results const& e) { +static void CheckSimple(Results const& e) { CHECK_COUNTER_VALUE(e, double, "CYCLES", GT, 0); CHECK_COUNTER_VALUE(e, double, "BRANCHES", GT, 0.0); }
diff --git a/test/repetitions_test.cc b/test/repetitions_test.cc index f93de50..2f94d05 100644 --- a/test/repetitions_test.cc +++ b/test/repetitions_test.cc
@@ -6,7 +6,7 @@ // ------------------------ Testing Basic Output --------------------------- // // ========================================================================= // -void BM_ExplicitRepetitions(benchmark::State& state) { +static void BM_ExplicitRepetitions(benchmark::State& state) { for (auto _ : state) { } } @@ -105,7 +105,7 @@ // ------------------------ Testing Basic Output --------------------------- // // ========================================================================= // -void BM_ImplicitRepetitions(benchmark::State& state) { +static void BM_ImplicitRepetitions(benchmark::State& state) { for (auto _ : state) { } }