Skip to content

Commit

Permalink
Update .clang-tidy to ignore benchmark::RegisterBenchmark
Browse files Browse the repository at this point in the history
<snip>arborx/benchmarks/bvh_driver/benchmark_registration.hpp:383:7:
    warning: redundant call to 'c_str' [readability-redundant-string-cstr]
      spec.create_label_construction(description).c_str(),

benchmark switched to using std::string only in 1.8. As right now we
require 1.5.4, we disable this check.
  • Loading branch information
aprokop committed Dec 31, 2023
1 parent 82ed914 commit 4728611
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,performance-*,-performance-inefficient-string-concatenation,mpi-*,modernize-*,-modernize-pass-by-value,-modernize-use-trailing-return-type,-modernize-avoid-c-arrays,-modernize-use-nodiscard,-modernize-concat-nested-namespaces,readability-*,-readability-braces-around-statements,-readability-named-parameter,-readability-magic-numbers,-readability-uppercase-literal-suffix,-readability-identifier-length,-readability-function-cognitive-complexity'
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,performance-*,-performance-inefficient-string-concatenation,mpi-*,modernize-*,-modernize-pass-by-value,-modernize-use-trailing-return-type,-modernize-avoid-c-arrays,-modernize-use-nodiscard,-modernize-concat-nested-namespaces,readability-*,-readability-braces-around-statements,-readability-named-parameter,-readability-magic-numbers,-readability-uppercase-literal-suffix,-readability-identifier-length,-readability-function-cognitive-complexity,-readability-redundant-string-cstr'
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
find_package(Boost 1.56.0 REQUIRED COMPONENTS program_options)

# FIXME: when we start requiring benchmark >= 1.8.0, reenable
# "readability-redundant-string-cstr" check in .clang-tidy
find_package(benchmark 1.5.4 REQUIRED)
message(STATUS "Found benchmark: ${benchmark_DIR} (version \"${benchmark_VERSION}\")")

Expand Down

0 comments on commit 4728611

Please sign in to comment.