diff options
Diffstat (limited to 'include/unicode')
-rw-r--r-- | include/unicode/prop.h | 2 | ||||
-rw-r--r-- | include/unicode/string.h | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/unicode/prop.h b/include/unicode/prop.h index 485a0cb..e3e0d5e 100644 --- a/include/unicode/prop.h +++ b/include/unicode/prop.h @@ -482,7 +482,7 @@ enum uprop_ea { EA_W, /* Narrow */ }; -enum [[clang::__flag_enum__]] uprop_gc : uint_least32_t { +enum [[clang::flag_enum]] uprop_gc : uint_least32_t { GC_CN = UINT32_C(1) << 0, /* Not Assigned */ GC_CC = UINT32_C(1) << 1, /* Control */ GC_CF = UINT32_C(1) << 2, /* Format */ diff --git a/include/unicode/string.h b/include/unicode/string.h index 96fef13..81c2aff 100644 --- a/include/unicode/string.h +++ b/include/unicode/string.h @@ -8,7 +8,7 @@ /* clang-format off */ -enum [[clang::__flag_enum__]] caseflags { +enum [[clang::flag_enum]] caseflags { CF_LANG_AZ = 1 << 0, /* Azeri; alias for CF_LANG_TR */ CF_LANG_TR = 1 << 0, /* Turkish; alias for CF_LANG_AZ */ CF_LANG_LT = 1 << 1, /* Lithuanian */ @@ -17,16 +17,16 @@ enum [[clang::__flag_enum__]] caseflags { /* clang-format on */ -[[__nodiscard__]] size_t u8glen(const char8_t *, size_t); +[[nodiscard]] size_t u8glen(const char8_t *, size_t); size_t u8gnext(struct u8view *, const char8_t **, size_t *); -#define _mlib_warn_trunc __nodiscard__("don’t forget to check for truncation") - -[[_mlib_warn_trunc]] size_t u8casefold(char8_t *restrict, size_t, - const char8_t *, size_t, enum caseflags); -[[_mlib_warn_trunc]] size_t u8lower(char8_t *restrict, size_t, const char8_t *, - size_t, enum caseflags); -[[_mlib_warn_trunc]] size_t u8upper(char8_t *restrict, size_t, const char8_t *, - size_t, enum caseflags); +#define mlib_warn_trunc nodiscard("don’t forget to check for truncation") +[[mlib_warn_trunc]] size_t u8casefold(char8_t *restrict, size_t, + const char8_t *, size_t, enum caseflags); +[[mlib_warn_trunc]] size_t u8lower(char8_t *restrict, size_t, const char8_t *, + size_t, enum caseflags); +[[mlib_warn_trunc]] size_t u8upper(char8_t *restrict, size_t, const char8_t *, + size_t, enum caseflags); +#undef mlib_warn_trunc #endif /* !MLIB_UNICODE_STRING_H */ |