diff options
author | das <das@noemail.net> | 2009-09-07 06:20:46 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2009-09-07 06:20:46 (GMT) |
commit | a81181ea1a7922c91f02e95e4eab568369362d69 (patch) | |
tree | 23502a64a8041c23b7ecc2f7d305accd4585c4a7 /generic/tclInt.h | |
parent | 1e4942a41c4c9079d370180bd8b25b4a2e59165c (diff) | |
download | tcl-a81181ea1a7922c91f02e95e4eab568369362d69.zip tcl-a81181ea1a7922c91f02e95e4eab568369362d69.tar.gz tcl-a81181ea1a7922c91f02e95e4eab568369362d69.tar.bz2 |
make support for clang static analyzer safer & cleaner
FossilOrigin-Name: 32d1a61713b724b7def406063dbb4bc683b00393
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 97cb891..a27b0f4 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.440 2009/09/04 17:33:12 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.441 2009/09/07 06:20:47 das Exp $ */ #ifndef _TCLINT @@ -4300,19 +4300,21 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #endif /* TCL_MEM_DEBUG */ /* - * Macros for clang static analyzer + * Support for Clang Static Analyzer <http://clang-analyzer.llvm.org> */ -#if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT) +#if defined(PURIFY) && defined(__clang__) +#if __has_feature(attribute_analyzer_noreturn) && \ + !defined(Tcl_Panic) && defined(Tcl_Panic_TCL_DECLARED) +void Tcl_Panic(const char *, ...) __attribute__((analyzer_noreturn)); +#endif +#if !defined(CLANG_ASSERT) #include <assert.h> #define CLANG_ASSERT(x) assert(x) -#ifndef USE_TCL_STUBS -EXTERN void Tcl_Panic(const char * format, ...) - __attribute__((analyzer_noreturn)); #endif #elif !defined(CLANG_ASSERT) #define CLANG_ASSERT(x) -#endif +#endif /* PURIFY && __clang__ */ /* *---------------------------------------------------------------- |