Skip to content

Commit 9fc7b9b

Browse files
committed
[libcxx][regex] add [[__fallthrough__]] to suppress fallthrough warning
Summary: The diff #97926 is stacked on top of this patch because this file reports an error when enabling `-Wimplicit-fallthrough` in `-Wextra`. Test plan: ```sh $ time (mkdir build_runtimes && cd build_runtimes && set -x && CC=../build/bin/clang CXX=../build/bin/clang++ cmake -G Ninja ../runtimes -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind' && ninja && bin/llvm-lit -sv ../libcxx/test/std/re ) ``` note: whether I put a `break;` or fallthrough, the tests pass anyways which is sus.
1 parent 69f76c7 commit 9fc7b9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/regex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3921,7 +3921,7 @@ _ForwardIterator basic_regex<_CharT, _Traits>::__parse_character_escape(
39213921
if (__hd == -1)
39223922
__throw_regex_error<regex_constants::error_escape>();
39233923
__sum = 16 * __sum + static_cast<unsigned>(__hd);
3924-
// fallthrough
3924+
_LIBCPP_FALLTHROUGH();
39253925
case 'x':
39263926
++__first;
39273927
if (__first == __last)

0 commit comments

Comments
 (0)