From: Oliver Kurth Date: Tue, 12 Nov 2019 02:12:22 +0000 (-0800) Subject: Common header file change not applicable to open-vm-tools. X-Git-Tag: stable-11.1.0~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a5baa86f63b9dea95fba20283c835944a187635;p=thirdparty%2Fopen-vm-tools.git Common header file change not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h index 3c82e0407..4939586b8 100644 --- a/open-vm-tools/lib/include/vm_basic_defs.h +++ b/open-vm-tools/lib/include/vm_basic_defs.h @@ -851,4 +851,19 @@ typedef int pid_t; */ #define UNCHECKED_SWITCH__FIXME(x) switch ((uint64)(x)) + +/* + * When clang static analyzer parses source files, it implicitly defines + * __clang_analyzer__ macro. We use this to define our custom macro to stop + * its execution for the current path of analysis by calling a function that + * doesn't return, making it think that it hit a failed assertion. + * + * DO NOT use to silence the analyzer! See PR2447238. + */ +#ifdef __clang_analyzer__ +#define VMW_CLANG_ANALYZER_NORETURN() Panic("Disable Clang static analyzer") +#else +#define VMW_CLANG_ANALYZER_NORETURN() ((void)0) +#endif + #endif // ifndef _VM_BASIC_DEFS_H_