File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 2424* Macros
2525*/
2626
27+ #if defined _MSC_VER
28+ /* See https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros */
29+ # define ASSERT_FUNCTION __FUNCTION__
30+ #elif defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
31+ # define ASSERT_FUNCTION __func__
32+ #else
33+ # define ASSERT_FUNCTION ((const char*)0)
34+ #endif
35+
2736#ifdef DEBUG
2837# define debug (level ) ((ctags_debugLevel & (long)(level)) != 0)
2938# define DebugStatement (x ) x
3342# define AssertNotReached () do {} while(0)
3443# else
3544 /* We expect cc supports c99 standard. */
36- # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
37- # define ASSERT_FUNCTION __func__
38- # else
39- # define ASSERT_FUNCTION ((const char*)0)
40- # endif
4145# define Assert (c ) ((c) ? ((void)0) : debugAssert(#c, __FILE__, __LINE__, ASSERT_FUNCTION))
4246# define AssertNotReached () Assert(!"The control reaches unexpected place")
4347# endif
You can’t perform that action at this time.
0 commit comments