5#ifndef INCLUDE_CPPGC_MACROS_H_
6#define INCLUDE_CPPGC_MACROS_H_
14#define CPPGC_DISALLOW_NEW() \
16 using IsDisallowNewMarker CPPGC_UNUSED = int; \
17 void* operator new(size_t, void* location) { return location; } \
18 void* operator new(size_t) = delete; \
19 static_assert(true, "Force semicolon.")
26#define CPPGC_STACK_ALLOCATED() \
28 using IsStackAllocatedTypeMarker CPPGC_UNUSED = int; \
31 void* operator new(size_t) = delete; \
32 void* operator new(size_t, void*) = delete; \
33 static_assert(true, "Force semicolon.")
35#define CPPGC_STACK_ALLOCATED_IGNORE(bug_or_reason) \
36 __attribute__((annotate("stack_allocated_ignore")))
38#define CPPGC_PLUGIN_IGNORE(bug_or_reason) \
39 __attribute__((annotate("blink_gc_plugin_ignore"), \
40 annotate("stack_allocated_ignore")))
44#define CPPGC_STACK_ALLOCATED() static_assert(true, "Force semicolon.")
45#define CPPGC_STACK_ALLOCATED_IGNORE(bug_or_reason)
46#define CPPGC_PLUGIN_IGNORE(bug_or_reason)
52 requires {
typename T::IsStackAllocatedTypeMarker; };
Definition: allocation.h:38