7 #if FW_ASSERT_LEVEL == FW_NO_ASSERT
9 #else // ASSERT is defined
11 #if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
12 #define FILE_NAME_ARG NATIVE_UINT_TYPE
13 #define FW_ASSERT(cond, ...) \
14 ((void) ((cond) ? (0) : \
15 (Fw::SwAssert(ASSERT_FILE_ID, __LINE__, ##__VA_ARGS__))))
17 #define FILE_NAME_ARG const CHAR*
18 #define FW_ASSERT(cond, ...) \
19 ((void) ((cond) ? (0) : \
20 (Fw::SwAssert(__FILE__, __LINE__, ##__VA_ARGS__))))
26 #ifndef CLANG_ANALYZER_NORETURN
28 #define __has_feature(x) 0 // Compatibility with non-clang compilers.
30 #if __has_feature(attribute_analyzer_noreturn)
31 #define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
33 #define CLANG_ANALYZER_NORETURN
55 AssertHook() : previousHook(nullptr) {};
56 virtual ~AssertHook() {};
58 virtual void reportAssert(
71 virtual void printAssert(
const CHAR* msg);
74 virtual void doAssert();
78 void deregisterHook();
83 AssertHook *previousHook;
88 #endif // if ASSERT is defined