mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 02:04:20 +00:00
wikiheaders: Fixes and cleanups to fix SDL_ReportAssertion's wiki page.
This commit is contained in:
@@ -244,17 +244,7 @@ typedef struct SDL_AssertData
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data,
|
||||
const char *func,
|
||||
const char *file, int line)
|
||||
#ifdef __clang__
|
||||
#if __has_feature(attribute_analyzer_noreturn)
|
||||
__attribute__((analyzer_noreturn))
|
||||
#endif
|
||||
#endif
|
||||
;
|
||||
/* Previous 'analyzer_noreturn' attribute tells Clang's static analysis that we're a custom assert function,
|
||||
and that the analyzer should assume the condition was always true past this
|
||||
SDL_assert test. */
|
||||
|
||||
const char *file, int line) SDL_ANALYZER_NORETURN;
|
||||
|
||||
/* Define the trigger breakpoint call used in asserts */
|
||||
#ifndef SDL_AssertBreakpoint
|
||||
|
||||
@@ -139,6 +139,16 @@
|
||||
#endif
|
||||
#endif /* SDL_NORETURN not defined */
|
||||
|
||||
#ifdef __clang__
|
||||
#if __has_feature(attribute_analyzer_noreturn)
|
||||
#define SDL_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SDL_ANALYZER_NORETURN
|
||||
#define SDL_ANALYZER_NORETURN
|
||||
#endif
|
||||
|
||||
/* Apparently this is needed by several Windows compilers */
|
||||
#ifndef __MACH__
|
||||
#ifndef NULL
|
||||
|
||||
Reference in New Issue
Block a user