зеркало из https://github.com/mozilla/gecko-dev.git
Back out c34781199047 (bug 997145) for wrong-tree build bustage
This commit is contained in:
Родитель
c90b23e009
Коммит
3e0a791b3d
|
@ -124,7 +124,7 @@ extern "C" {
|
|||
* for use in implementing release-build assertions.
|
||||
*/
|
||||
static MOZ_ALWAYS_INLINE void
|
||||
MOZ_ReportAssertionFailure(const char* s, const char* file, int ln) MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS
|
||||
MOZ_ReportAssertionFailure(const char* s, const char* file, int ln)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
__android_log_print(ANDROID_LOG_FATAL, "MOZ_Assert",
|
||||
|
@ -136,7 +136,7 @@ MOZ_ReportAssertionFailure(const char* s, const char* file, int ln) MOZ_PRETEND_
|
|||
}
|
||||
|
||||
static MOZ_ALWAYS_INLINE void
|
||||
MOZ_ReportCrash(const char* s, const char* file, int ln) MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS
|
||||
MOZ_ReportCrash(const char* s, const char* file, int ln)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
__android_log_print(ANDROID_LOG_FATAL, "MOZ_CRASH",
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
* Current versions of g++ do not correctly set __cplusplus, so we check both
|
||||
* for forward compatibility.
|
||||
*/
|
||||
#if defined(__clang__) || defined(__clang_analyzer__)
|
||||
#if defined(__clang__)
|
||||
/*
|
||||
* Per Clang documentation, "Note that marketing version numbers should not
|
||||
* be used to check for language features, as different vendors use different
|
||||
|
@ -64,9 +64,6 @@
|
|||
# define MOZ_HAVE_CXX11_OVERRIDE
|
||||
# define MOZ_HAVE_CXX11_FINAL final
|
||||
# endif
|
||||
# if __has_extension(attribute_analyzer_noreturn)
|
||||
# define MOZ_HAVE_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
|
||||
# endif
|
||||
# if __has_attribute(noinline)
|
||||
# define MOZ_HAVE_NEVER_INLINE __attribute__((noinline))
|
||||
# endif
|
||||
|
@ -156,27 +153,6 @@
|
|||
# define MOZ_NORETURN /* no support */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS, specified at the end of a function
|
||||
* declaration, indicates that for the purposes of static analysis, this
|
||||
* function does not return. (The function definition does not need to be
|
||||
* annotated.)
|
||||
*
|
||||
* MOZ_ReportCrash(const char* s, const char* file, int ln) MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS
|
||||
*
|
||||
* Some static analyzers, like scan-build from clang, can use this information
|
||||
* to eliminate false positives. From the upstream documentation of scan-build:
|
||||
* "This attribute is useful for annotating assertion handlers that actually
|
||||
* can return, but for the purpose of using the analyzer we want to pretend
|
||||
* that such functions do not return."
|
||||
*
|
||||
*/
|
||||
#if defined(MOZ_HAVE_ANALYZER_NORETURN)
|
||||
# define MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS MOZ_HAVE_ANALYZER_NORETURN
|
||||
#else
|
||||
# define MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS /* no support */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MOZ_ASAN_BLACKLIST is a macro to tell AddressSanitizer (a compile-time
|
||||
* instrumentation shipped with Clang and GCC) to not instrument the annotated
|
||||
|
|
Загрузка…
Ссылка в новой задаче