Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorOliverBeeckAVM2026-01-01 22:56:14 +0100
committerGitHub2026-01-01 22:56:14 +0100
commitb7e31c9ab3a4b6f7ef5f11d01aa3453c03e695b6 (patch)
tree5899aaa073994682ead053370a19374a411e21e3 /src
parent88abf9bf325c798c33f54f6b9220ef885b267f4f (diff)
downloadcatch3-b7e31c9ab3a4b6f7ef5f11d01aa3453c03e695b6.tar.gz
Suppress static analysis warning 26426 for Windows/MSVC builds (#3057)
Suppress `Global initializer calls a non-constexpr function 'Catch::makeTestInvoker' (i.22).`, which is issued when using macro `TEST_CASE` for windows/MSVC builds. --------- Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/catch2/internal/catch_compiler_capabilities.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp
index 983fb63b..80bb3af0 100644
--- a/src/catch2/internal/catch_compiler_capabilities.hpp
+++ b/src/catch2/internal/catch_compiler_capabilities.hpp
@@ -219,6 +219,11 @@
__pragma( warning( pop ) )
# endif
+// Suppress MSVC C++ Core Guidelines checker warning 26426:
+// "Global initializer calls a non-constexpr function (i.22)"
+# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+ __pragma( warning( disable : 26426 ) )
+
// Universal Windows platform does not support SEH
# if !defined(CATCH_PLATFORM_WINDOWS_UWP)
# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH