From 6426b03476fb91efbd90acd599472010f5474390 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 22 Nov 2020 18:17:09 +0100 Subject: Suppress various clang-tidy warnings These libc-specific warnings are a new level, even for LLVM. Using an opt-out style for this is probably not going to last. --- bindings/cxx/include/.clang-tidy | 2 ++ examples/.clang-tidy | 7 +++++++ include/.clang-tidy | 1 + src/.clang-tidy | 5 +++++ test/.clang-tidy | 4 ++++ 5 files changed, 19 insertions(+) diff --git a/bindings/cxx/include/.clang-tidy b/bindings/cxx/include/.clang-tidy index 182d0d7..816223d 100644 --- a/bindings/cxx/include/.clang-tidy +++ b/bindings/cxx/include/.clang-tidy @@ -5,6 +5,8 @@ Checks: > -cppcoreguidelines-pro-bounds-pointer-arithmetic, -cppcoreguidelines-pro-type-static-cast-downcast, -google-runtime-references, + -hicpp-named-parameter, + -llvmlibc-*, -modernize-use-trailing-return-type, -readability-implicit-bool-conversion, -readability-named-parameter, diff --git a/examples/.clang-tidy b/examples/.clang-tidy index 2a0160d..ad5b75a 100644 --- a/examples/.clang-tidy +++ b/examples/.clang-tidy @@ -4,10 +4,14 @@ Checks: > -*magic-numbers, -*uppercase-literal-suffix, -android-cloexec-fopen, + -bugprone-reserved-identifier, -bugprone-suspicious-string-compare, + -cert-dcl37-c, + -cert-dcl51-cpp, -cert-flp30-c, -clang-analyzer-alpha.*, -clang-analyzer-security.FloatLoopCounter, + -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, -cppcoreguidelines-pro-bounds-constant-array-index, -cppcoreguidelines-pro-bounds-pointer-arithmetic, @@ -17,10 +21,13 @@ Checks: > -fuchsia-default-arguments-calls, -google-runtime-references, -hicpp-multiway-paths-covered, + -hicpp-named-parameter, -hicpp-no-array-decay, -hicpp-signed-bitwise, -hicpp-vararg, + -llvm-else-after-return, -llvm-header-guard, + -llvmlibc-*, -misc-misplaced-const, -misc-non-private-member-variables-in-classes, -modernize-use-trailing-return-type, diff --git a/include/.clang-tidy b/include/.clang-tidy index ccf7b3c..dd2fd47 100644 --- a/include/.clang-tidy +++ b/include/.clang-tidy @@ -4,5 +4,6 @@ Checks: > -*-uppercase-literal-suffix, -clang-diagnostic-unused-function, -clang-diagnostic-unused-macros, + -llvmlibc-*, FormatStyle: file HeaderFilterRegex: 'pugl/.*' diff --git a/src/.clang-tidy b/src/.clang-tidy index bdbd078..808cbb1 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -2,13 +2,18 @@ Checks: > *, -*-uppercase-literal-suffix, -*magic-numbers, + -bugprone-reserved-identifier, -bugprone-suspicious-string-compare, + -cert-dcl37-c, + -cert-dcl51-cpp, -cert-flp30-c, -clang-analyzer-security.FloatLoopCounter, -clang-diagnostic-unused-macros, -hicpp-multiway-paths-covered, -hicpp-signed-bitwise, + -llvm-else-after-return, -llvm-header-guard, + -llvmlibc-*, -readability-else-after-return, FormatStyle: file HeaderFilterRegex: 'pugl/.*' diff --git a/test/.clang-tidy b/test/.clang-tidy index 5f3596a..e7c1e2c 100644 --- a/test/.clang-tidy +++ b/test/.clang-tidy @@ -2,9 +2,13 @@ Checks: > *, -*-magic-numbers, -*-uppercase-literal-suffix, + -bugprone-reserved-identifier, + -cert-dcl37-c, + -cert-dcl51-cpp, -hicpp-multiway-paths-covered, -hicpp-signed-bitwise, -llvm-header-guard, + -llvmlibc-*, -modernize-use-trailing-return-type, FormatStyle: file HeaderFilterRegex: 'pugl/.*|test/.*' -- cgit v1.2.1