mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +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
Notes:
sideshowbarker
2024-07-19 00:34:10 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/21a5524d010 Pull-request: https://github.com/SerenityOS/serenity/pull/4545 Reviewed-by: https://github.com/alimpfard
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue