From fe806878be8908b52b3b092e979505644841cd2d Mon Sep 17 00:00:00 2001
From: Maksim Shabunin <maksim.shabunin@gmail.com>
Date: Wed, 18 Jul 2018 15:53:16 +0300
Subject: [PATCH] Enable debug assertions for static analysis builds

---
 modules/core/include/opencv2/core/base.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/core/include/opencv2/core/base.hpp b/modules/core/include/opencv2/core/base.hpp
index 766e63b6eb..2e8e5d5e86 100644
--- a/modules/core/include/opencv2/core/base.hpp
+++ b/modules/core/include/opencv2/core/base.hpp
@@ -487,7 +487,7 @@ configurations while CV_DbgAssert is only retained in the Debug configuration.
 #define CV_Assert(...) do { CVAUX_CONCAT(CV_Assert_, CV_VA_NUM_ARGS(__VA_ARGS__)) (__VA_ARGS__); } while(0)
 
 /** replaced with CV_Assert(expr) in Debug configuration */
-#ifdef _DEBUG
+#if defined _DEBUG || defined CV_STATIC_ANALYSIS
 #  define CV_DbgAssert(expr) CV_Assert(expr)
 #else
 #  define CV_DbgAssert(expr)
-- 
2.18.0