summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordas <das>2009-06-30 00:56:08 (GMT)
committerdas <das>2009-06-30 00:56:08 (GMT)
commit93288b1b6b66e279ff92700ad78627879c3e3531 (patch)
tree1bdf0fea8a0fb90c3543dc08e19ae48f32da670a /generic/tclInt.h
parentccc761ddde222870a23a9ab6a3b3ee16e6bb2924 (diff)
downloadtcl-93288b1b6b66e279ff92700ad78627879c3e3531.zip
tcl-93288b1b6b66e279ff92700ad78627879c3e3531.tar.gz
tcl-93288b1b6b66e279ff92700ad78627879c3e3531.tar.bz2
* generic/tclInt.h: add assert macros for clang static
* generic/tclPanic.c: analyzer and redefine Tcl_Panic to * generic/tclStubInit.c: assert after panic in clang PURIFY builds. * generic/tclCmdIL.c: add clang assert for false positive from static analyzer.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index d75eaa6..80aec34 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.424 2009/06/18 09:41:27 dkf Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.425 2009/06/30 00:56:08 das Exp $
*/
#ifndef _TCLINT
@@ -4186,6 +4186,20 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum,
#endif /* TCL_MEM_DEBUG */
/*
+ * Macros for clang static analyzer
+ */
+
+#if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT)
+#include <assert.h>
+#define CLANG_ASSERT(x) assert(x)
+#define Tcl_PanicEx Tcl_Panic
+#undef Tcl_Panic
+#define Tcl_Panic(f, ...) Tcl_PanicEx(f,##__VA_ARGS__); CLANG_ASSERT(0)
+#elif !defined(CLANG_ASSERT)
+#define CLANG_ASSERT(x)
+#endif
+
+/*
*----------------------------------------------------------------
* Parameters, structs and macros for the non-recursive engine (NRE)
*----------------------------------------------------------------