mirror of
https://github.com/google/benchmark.git
synced 2025-02-26 03:10:11 +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) \
|
||||
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_) = \
|
||||
|
Loading…
Reference in New Issue
Block a user