mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
AK: Add NO_DISCARD macro to allow clang-format friendly class annotations
clang-format seems to barf on these attributes, to make it easier to use these attributes and have clang-format not mangle the following code we can hide them behind a macro so clang-format doesn't have to handle it.
This commit is contained in:
parent
33834090bb
commit
21a5524d01
|
@ -51,6 +51,11 @@
|
||||||
#endif
|
#endif
|
||||||
#define FLATTEN [[gnu::flatten]]
|
#define FLATTEN [[gnu::flatten]]
|
||||||
|
|
||||||
|
#ifdef NO_DISCARD
|
||||||
|
# undef NO_DISCARD
|
||||||
|
#endif
|
||||||
|
#define NO_DISCARD [[nodiscard]]
|
||||||
|
|
||||||
#ifndef __serenity__
|
#ifndef __serenity__
|
||||||
# define PAGE_SIZE sysconf(_SC_PAGESIZE)
|
# define PAGE_SIZE sysconf(_SC_PAGESIZE)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue