diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h index 558aca8d..1444ec61 100644 --- a/include/benchmark/benchmark.h +++ b/include/benchmark/benchmark.h @@ -1362,6 +1362,8 @@ class LambdaBenchmark : public Benchmark { inline internal::Benchmark* RegisterBenchmark(const std::string& name, internal::Function* fn) { + // FIXME: this should be a `std::make_unique<>()` but we don't have C++14. + // codechecker_intentional [cplusplus.NewDeleteLeaks] return internal::RegisterBenchmarkInternal( ::new internal::FunctionBenchmark(name, fn)); } @@ -1371,6 +1373,8 @@ template internal::Benchmark* RegisterBenchmark(const std::string& name, Lambda&& fn) { using BenchType = internal::LambdaBenchmark::type>; + // FIXME: this should be a `std::make_unique<>()` but we don't have C++14. + // codechecker_intentional [cplusplus.NewDeleteLeaks] return internal::RegisterBenchmarkInternal( ::new BenchType(name, std::forward(fn))); }