mirror of
https://github.com/google/benchmark.git
synced 2025-02-26 19:30:12 +08:00
benchmark declarations can and should be const (clang-tidy) (#1924)
* benchmark declarations can and should be const (clang-tidy) * clang-format * add clang-tidy ignore file to remove googletest (and other third party) source for consideration
This commit is contained in:
parent
a125fb6736
commit
6a508bf11e
1
.clang-tidy.ignore
Normal file
1
.clang-tidy.ignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
.*third_party/.*
|
@ -1438,10 +1438,10 @@ class Fixture : public internal::Benchmark {
|
|||||||
#define BENCHMARK_PRIVATE_CONCAT_NAME(BaseClass, Method) \
|
#define BENCHMARK_PRIVATE_CONCAT_NAME(BaseClass, Method) \
|
||||||
BaseClass##_##Method##_Benchmark
|
BaseClass##_##Method##_Benchmark
|
||||||
|
|
||||||
#define BENCHMARK_PRIVATE_DECLARE(n) \
|
#define BENCHMARK_PRIVATE_DECLARE(n) \
|
||||||
/* NOLINTNEXTLINE(misc-use-anonymous-namespace) */ \
|
/* NOLINTNEXTLINE(misc-use-anonymous-namespace) */ \
|
||||||
static ::benchmark::internal::Benchmark* BENCHMARK_PRIVATE_NAME(n) \
|
static ::benchmark::internal::Benchmark const* const BENCHMARK_PRIVATE_NAME( \
|
||||||
[[maybe_unused]]
|
n) [[maybe_unused]]
|
||||||
|
|
||||||
#define BENCHMARK(...) \
|
#define BENCHMARK(...) \
|
||||||
BENCHMARK_PRIVATE_DECLARE(_benchmark_) = \
|
BENCHMARK_PRIVATE_DECLARE(_benchmark_) = \
|
||||||
|
Loading…
Reference in New Issue
Block a user