1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 01:10:47 +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:
Brian Gianforcaro 2020-12-26 04:08:53 -08:00 committed by Andreas Kling
parent 33834090bb
commit 21a5524d01

View File

@ -51,6 +51,11 @@
#endif
#define FLATTEN [[gnu::flatten]]
#ifdef NO_DISCARD
# undef NO_DISCARD
#endif
#define NO_DISCARD [[nodiscard]]
#ifndef __serenity__
# define PAGE_SIZE sysconf(_SC_PAGESIZE)