Add missing '\param' documentation

This commit is contained in:
Sylvain 2023-02-12 09:40:39 +01:00 committed by Sylvain Becker
parent ce366facaa
commit 43c08170af
12 changed files with 83 additions and 9 deletions
include/SDL3

View file

@ -130,19 +130,28 @@ typedef struct SDL_AssertData
#if (SDL_ASSERT_LEVEL > 0)
/* Never call this directly. Use the SDL_assert* macros. */
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
const char *,
const char *, int)
/**
* Never call this directly. Use the SDL_assert* macros.
*
* \param data assert data structure
* \param func function name
* \param file file name
* \param line line number
* \returns assert state
*/
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data,
const char *func,
const char *file, int line)
#if defined(__clang__)
#if __has_feature(attribute_analyzer_noreturn)
/* this 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. */
__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. */
/* the do {} while(0) avoids dangling else problems:
if (x) SDL_assert(y); else blah();