mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
AK: Use __attribute__((name))
for functions everywhere
Clang enforces the ordering that attributes specified with the `[[attr_name]]` syntax must comes before those defines as `__attribute__((attr_name))`. We don't want to deal with that, so we should stick to a single syntax (for functions, at least). This commit favors the latter, as it's used more widely in the code (for declaring more "exotic" options), and changing those would be a larger effort than modifying this single file.
This commit is contained in:
parent
74535628a8
commit
eee44c85d4
Notes:
sideshowbarker
2024-07-18 11:34:39 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/eee44c85d4a Pull-request: https://github.com/SerenityOS/serenity/pull/8150 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/alimpfard ✅
1 changed files with 4 additions and 4 deletions
|
@ -28,22 +28,22 @@
|
|||
#ifdef ALWAYS_INLINE
|
||||
# undef ALWAYS_INLINE
|
||||
#endif
|
||||
#define ALWAYS_INLINE [[gnu::always_inline]] inline
|
||||
#define ALWAYS_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
#ifdef NEVER_INLINE
|
||||
# undef NEVER_INLINE
|
||||
#endif
|
||||
#define NEVER_INLINE [[gnu::noinline]]
|
||||
#define NEVER_INLINE __attribute__((noinline))
|
||||
|
||||
#ifdef FLATTEN
|
||||
# undef FLATTEN
|
||||
#endif
|
||||
#define FLATTEN [[gnu::flatten]]
|
||||
#define FLATTEN __attribute__((flatten))
|
||||
|
||||
#ifdef NO_SANITIZE_ADDRESS
|
||||
# undef NO_SANITIZE_ADDRESS
|
||||
#endif
|
||||
#define NO_SANITIZE_ADDRESS [[gnu::no_sanitize_address]]
|
||||
#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
|
||||
|
||||
// GCC doesn't have __has_feature but clang does
|
||||
#ifndef __has_feature
|
||||
|
|
Loading…
Reference in a new issue