mirror of https://github.com/google/benchmark.git
Disables 'misc-use-anonymous-namespace' for usage of the BENCHMARK macro. This warning is spurious, and the variable declared by the BENCHMARK macro can't be moved into an annonymous namespace. We don't want to disable it globally, but it can be disabled locally, for the `BENCHMARK` statement, as this warning appears downstream for users. See: https://clang.llvm.org/extra/clang-tidy/#suppressing-undesired-diagnostics
This commit is contained in:
parent
24e0bd827a
commit
0c998f7cc4
|
@ -1554,6 +1554,7 @@ class Fixture : public internal::Benchmark {
|
||||||
BaseClass##_##Method##_Benchmark
|
BaseClass##_##Method##_Benchmark
|
||||||
|
|
||||||
#define BENCHMARK_PRIVATE_DECLARE(n) \
|
#define BENCHMARK_PRIVATE_DECLARE(n) \
|
||||||
|
/* NOLINTNEXTLINE(misc-use-anonymous-namespace) */ \
|
||||||
static ::benchmark::internal::Benchmark* BENCHMARK_PRIVATE_NAME(n) \
|
static ::benchmark::internal::Benchmark* BENCHMARK_PRIVATE_NAME(n) \
|
||||||
BENCHMARK_UNUSED
|
BENCHMARK_UNUSED
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue