FS2_Open
Open source remastering of the Freespace 2 engine
clang.h File Reference

Macros to abstract compiler capabilities for the Clang toolchain. More...

Go to the source code of this file.

Macros

#define SCP_FORMAT_STRING
 
#define SCP_FORMAT_STRING_ARGS(x, y)   __attribute__((format(printf, x, y)))
 
#define __UNUSED   __attribute__((__unused__))
 
#define __ALIGNED(x)   __attribute__((__aligned__(x)))
 
#define RESTRICT   restrict
 
#define ASSUME(x)
 
#define Assertion(expr, msg, ...)
 
#define SIZE_T_ARG   "%zu"
 
#define PTRDIFF_T_ARG   "%zd"
 
#define NOEXCEPT   noexcept
 
#define likely(x)    __builtin_expect((long) !!(x), 1L)
 
#define unlikely(x)   __builtin_expect((long) !!(x), 0L)
 

Detailed Description

Macros to abstract compiler capabilities for the Clang toolchain.

Definition in file clang.h.

Macro Definition Documentation

#define __ALIGNED (   x)    __attribute__((__aligned__(x)))

Definition at line 24 of file clang.h.

#define __UNUSED   __attribute__((__unused__))

Definition at line 23 of file clang.h.

#define Assertion (   expr,
  msg,
  ... 
)
Value:
do { \
if (!(expr)) { \
WinAssert(#expr, __FILE__, __LINE__, msg, ##__VA_ARGS__); \
} \
} while (0)
if(aifft_max_checks<=0)
Definition: aiturret.cpp:1581
void _cdecl WinAssert(char *text, char *filename, int line)
Definition: windebug.cpp:911

Definition at line 41 of file clang.h.

#define ASSUME (   x)

Definition at line 32 of file clang.h.

#define likely (   x)    __builtin_expect((long) !!(x), 1L)

Definition at line 66 of file clang.h.

#define NOEXCEPT   noexcept

Definition at line 64 of file clang.h.

#define PTRDIFF_T_ARG   "%zd"

Definition at line 62 of file clang.h.

#define RESTRICT   restrict

Definition at line 29 of file clang.h.

#define SCP_FORMAT_STRING

Definition at line 20 of file clang.h.

#define SCP_FORMAT_STRING_ARGS (   x,
  y 
)    __attribute__((format(printf, x, y)))

Definition at line 21 of file clang.h.

#define SIZE_T_ARG   "%zu"

Definition at line 61 of file clang.h.

#define unlikely (   x)    __builtin_expect((long) !!(x), 0L)

Definition at line 67 of file clang.h.