From d3dda9ff445751b4df304216dd98f527894109a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Mon, 12 Aug 2024 10:21:06 +0200 Subject: [PATCH] enabled and mitigated `performance-noexcept-swap` clang-tidy warnings (#6683) --- .clang-tidy | 1 - clang-tidy.md | 1 - gui/cppchecklibrarydata.h | 4 +++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index ad0afe924ea..9ed1dc7f65d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -56,7 +56,6 @@ Checks: > -performance-avoid-endl, -performance-inefficient-string-concatenation, -performance-no-automatic-move, - -performance-noexcept-swap, -portability-simd-intrinsics, -portability-std-allocator-const, -readability-avoid-const-params-in-decls, diff --git a/clang-tidy.md b/clang-tidy.md index 8ee7c36d714..b255fac75e9 100644 --- a/clang-tidy.md +++ b/clang-tidy.md @@ -122,7 +122,6 @@ We run this separately via `clang-include-cleaner` in the `iwyu.yml` workflow as `concurrency-mt-unsafe`
`misc-use-anonymous-namespace`
`performance-avoid-endl`
-`performance-noexcept-swap`
`bugprone-switch-missing-default-case`
`bugprone-empty-catch`
`readability-avoid-nested-conditional-operator`
diff --git a/gui/cppchecklibrarydata.h b/gui/cppchecklibrarydata.h index e4043eaa23a..7b53cfa59f4 100644 --- a/gui/cppchecklibrarydata.h +++ b/gui/cppchecklibrarydata.h @@ -19,6 +19,8 @@ #ifndef CPPCHECKLIBRARYDATA_H #define CPPCHECKLIBRARYDATA_H +#include "config.h" + #include #include @@ -227,7 +229,7 @@ class CppcheckLibraryData { entrypoints.clear(); } - void swap(CppcheckLibraryData &other) { + void swap(CppcheckLibraryData &other) NOEXCEPT { containers.swap(other.containers); defines.swap(other.defines); undefines.swap(other.undefines);