Skip to content

[libc++][NFC] Inline _LIBCPP_FALLTHROUGH() #135001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -1129,9 +1129,6 @@ typedef __char32_t char32_t;
__attribute__((__format__(archetype, format_string_index, first_format_arg_index)))
# define _LIBCPP_PACKED __attribute__((__packed__))

// Use a function like macro to imply that it must be followed by a semicolon
# define _LIBCPP_FALLTHROUGH() [[fallthrough]]

# if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC)
# define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
# else
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ struct __murmur2_or_cityhash<_Size, 32> {
switch (__len) {
case 3:
__h ^= static_cast<_Size>(__data[2] << 16);
_LIBCPP_FALLTHROUGH();
[[__fallthrough__]];
case 2:
__h ^= static_cast<_Size>(__data[1] << 8);
_LIBCPP_FALLTHROUGH();
[[__fallthrough__]];
case 1:
__h ^= __data[0];
__h *= __m;
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/locale
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,7 @@ bool money_get<_CharT, _InputIterator>::__do_get(
return false;
}
}
_LIBCPP_FALLTHROUGH();
[[__fallthrough__]];
case money_base::none:
if (__p != 3) {
while (__b != __e && __ct.is(ctype_base::space, *__b))
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/regex
Original file line number Diff line number Diff line change
Expand Up @@ -3930,7 +3930,7 @@ _ForwardIterator basic_regex<_CharT, _Traits>::__parse_character_escape(
if (__hd == -1)
std::__throw_regex_error<regex_constants::error_escape>();
__sum = 16 * __sum + static_cast<unsigned>(__hd);
_LIBCPP_FALLTHROUGH();
[[__fallthrough__]];
case 'x':
++__first;
if (__first == __last)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/filesystem/path_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct PathParser {
if (TkEnd)
return makeState(PS_InRootName, Start, TkEnd);
}
_LIBCPP_FALLTHROUGH();
[[__fallthrough__]];
case PS_InRootName: {
PosPtr TkEnd = consumeAllSeparators(Start, End);
if (TkEnd)
Expand Down
Loading