Skip to content

Commit

Permalink
benchmark declarations can and should be const (clang-tidy)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmah42 committed Feb 11, 2025
1 parent a125fb6 commit 56560d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/benchmark/benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -1438,10 +1438,10 @@ class Fixture : public internal::Benchmark {
#define BENCHMARK_PRIVATE_CONCAT_NAME(BaseClass, Method) \
BaseClass##_##Method##_Benchmark

#define BENCHMARK_PRIVATE_DECLARE(n) \
/* NOLINTNEXTLINE(misc-use-anonymous-namespace) */ \
static ::benchmark::internal::Benchmark* BENCHMARK_PRIVATE_NAME(n) \
[[maybe_unused]]
#define BENCHMARK_PRIVATE_DECLARE(n) \
/* NOLINTNEXTLINE(misc-use-anonymous-namespace) */ \
static ::benchmark::internal::Benchmark const * const \
BENCHMARK_PRIVATE_NAME(n) [[maybe_unused]]

#define BENCHMARK(...) \
BENCHMARK_PRIVATE_DECLARE(_benchmark_) = \
Expand Down

0 comments on commit 56560d6

Please sign in to comment.