diff options
author | David Robillard <d@drobilla.net> | 2022-06-28 23:10:43 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-14 14:12:35 -0400 |
commit | 3ae22e31b51e920d22a4bebb211e82b5d7e7c3f2 (patch) | |
tree | cd583bad825477cfbd54764a6ddc638bbda8f717 | |
parent | cde85f3f450f7c3f12e1f7c4a70cb374e4756319 (diff) | |
download | raul-3ae22e31b51e920d22a4bebb211e82b5d7e7c3f2.tar.gz raul-3ae22e31b51e920d22a4bebb211e82b5d7e7c3f2.tar.bz2 raul-3ae22e31b51e920d22a4bebb211e82b5d7e7c3f2.zip |
Update clang-tidy and IWYU configuration for clang 14
-rw-r--r-- | .includes.imp | 2 | ||||
-rw-r--r-- | include/.clang-tidy | 5 | ||||
-rw-r--r-- | test/.clang-tidy | 8 | ||||
-rw-r--r-- | test/ringbuffer_test.cpp | 4 |
4 files changed, 17 insertions, 2 deletions
diff --git a/.includes.imp b/.includes.imp index 88032d4..a1e53c1 100644 --- a/.includes.imp +++ b/.includes.imp @@ -1,4 +1,6 @@ [ + { "include": [ "<bits/chrono.h>", "private", "<chrono>", "public" ] }, + { "symbol": [ "CLOCK_REALTIME", "private", "<ctime>", "public" ] }, { "symbol": [ "CLOCK_REALTIME", "private", "<time.h>", "public" ] }, { "symbol": [ "__syscall_slong_t", "private", "<ctime>", "public" ] }, diff --git a/include/.clang-tidy b/include/.clang-tidy index b64c202..890edd2 100644 --- a/include/.clang-tidy +++ b/include/.clang-tidy @@ -5,7 +5,9 @@ Checks: > -*-no-malloc, -*-uppercase-literal-suffix, -abseil-string-find-str-contains, + -altera-*, -android-cloexec-accept, + -bugprone-easily-swappable-parameters, -clang-diagnostic-unused-macros, -cppcoreguidelines-owning-memory, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, @@ -17,7 +19,10 @@ Checks: > -google-runtime-int, -hicpp-no-array-decay, -llvmlibc-*, + -modernize-return-braced-init-list, + -modernize-use-nodiscard, -modernize-use-trailing-return-type, + -readability-identifier-length, -readability-implicit-bool-conversion, CheckOptions: - key: modernize-use-override.AllowOverrideAndFinal diff --git a/test/.clang-tidy b/test/.clang-tidy index 5c2e179..de052d2 100644 --- a/test/.clang-tidy +++ b/test/.clang-tidy @@ -5,7 +5,11 @@ Checks: > -*-uppercase-literal-suffix, -*-vararg, -abseil-string-find-str-contains, + -altera-*, -android-cloexec-accept, + -bugprone-easily-swappable-parameters, + -bugprone-exception-escape, + -cert-err33-c, -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-no-malloc, -cppcoreguidelines-owning-memory, @@ -22,7 +26,11 @@ Checks: > -hicpp-signed-bitwise, -llvmlibc-*, -modernize-make-unique, + -modernize-return-braced-init-list, + -modernize-use-nodiscard, -modernize-use-trailing-return-type, + -readability-function-cognitive-complexity, + -readability-identifier-length, -readability-implicit-bool-conversion, CheckOptions: - key: modernize-use-override.AllowOverrideAndFinal diff --git a/test/ringbuffer_test.cpp b/test/ringbuffer_test.cpp index ee9af30..1f94b02 100644 --- a/test/ringbuffer_test.cpp +++ b/test/ringbuffer_test.cpp @@ -109,12 +109,12 @@ main(int argc, char** argv) Context ctx; - uint32_t size = 512u; + uint32_t size = 512U; if (argc > 1) { size = static_cast<uint32_t>(std::stoi(argv[1])); } - ctx.n_writes = size * 1024u; + ctx.n_writes = size * size_t{1024U}; if (argc > 2) { ctx.n_writes = std::stoul(argv[2]); } |