mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
AK: Move clang-specific consumable annotation helpers to Platform.h
This commit is contained in:
parent
f88c5860df
commit
ecc35876af
3 changed files with 12 additions and 12 deletions
|
@ -4,18 +4,6 @@
|
|||
#include <AK/LogStream.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
#ifdef __clang__
|
||||
# define CONSUMABLE(initial_state) __attribute__((consumable(initial_state)))
|
||||
# define CALLABLE_WHEN(...) __attribute__((callable_when(__VA_ARGS__)))
|
||||
# define SET_TYPESTATE(state) __attribute__((set_typestate(state)))
|
||||
# define RETURN_TYPESTATE(state) __attribute__((return_typestate(state)))
|
||||
#else
|
||||
# define CONSUMABLE(initial_state)
|
||||
# define CALLABLE_WHEN(state)
|
||||
# define SET_TYPESTATE(state)
|
||||
# define RETURN_TYPESTATE(state)
|
||||
#endif
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue