Skip to content

Commit fe3cbed

Browse files
committed
[libc++][NFC] Inline _LIBCPP_FALLTHROUGH()
1 parent 6e7c40b commit fe3cbed

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

libcxx/include/__config

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,9 +1129,6 @@ typedef __char32_t char32_t;
11291129
__attribute__((__format__(archetype, format_string_index, first_format_arg_index)))
11301130
# define _LIBCPP_PACKED __attribute__((__packed__))
11311131

1132-
// Use a function like macro to imply that it must be followed by a semicolon
1133-
# define _LIBCPP_FALLTHROUGH() [[fallthrough]]
1134-
11351132
# if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC)
11361133
# define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
11371134
# else

libcxx/include/__functional/hash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ struct __murmur2_or_cityhash<_Size, 32> {
6464
switch (__len) {
6565
case 3:
6666
__h ^= static_cast<_Size>(__data[2] << 16);
67-
_LIBCPP_FALLTHROUGH();
67+
[[__fallthrough__]];
6868
case 2:
6969
__h ^= static_cast<_Size>(__data[1] << 8);
70-
_LIBCPP_FALLTHROUGH();
70+
[[__fallthrough__]];
7171
case 1:
7272
__h ^= __data[0];
7373
__h *= __m;

libcxx/include/locale

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2421,7 +2421,7 @@ bool money_get<_CharT, _InputIterator>::__do_get(
24212421
return false;
24222422
}
24232423
}
2424-
_LIBCPP_FALLTHROUGH();
2424+
[[__fallthrough__]];
24252425
case money_base::none:
24262426
if (__p != 3) {
24272427
while (__b != __e && __ct.is(ctype_base::space, *__b))

libcxx/include/regex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3930,7 +3930,7 @@ _ForwardIterator basic_regex<_CharT, _Traits>::__parse_character_escape(
39303930
if (__hd == -1)
39313931
std::__throw_regex_error<regex_constants::error_escape>();
39323932
__sum = 16 * __sum + static_cast<unsigned>(__hd);
3933-
_LIBCPP_FALLTHROUGH();
3933+
[[__fallthrough__]];
39343934
case 'x':
39353935
++__first;
39363936
if (__first == __last)

libcxx/src/filesystem/path_parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct PathParser {
9090
if (TkEnd)
9191
return makeState(PS_InRootName, Start, TkEnd);
9292
}
93-
_LIBCPP_FALLTHROUGH();
93+
[[__fallthrough__]];
9494
case PS_InRootName: {
9595
PosPtr TkEnd = consumeAllSeparators(Start, End);
9696
if (TkEnd)

0 commit comments

Comments
 (0)