[libcxx-commits] [libcxx] [libcxx] [regex] add `[[clang::fallthrough]]` to suppress fallthrough warning (PR #100821)
Max Coplan via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 26 15:05:43 PDT 2024
================
@@ -3921,7 +3921,7 @@ _ForwardIterator basic_regex<_CharT, _Traits>::__parse_character_escape(
if (__hd == -1)
__throw_regex_error<regex_constants::error_escape>();
__sum = 16 * __sum + static_cast<unsigned>(__hd);
- // fallthrough
+ [[clang::fallthrough]];
----------------
vegerot wrote:
Question for reviewer: this fallthrough looks strange. Are we sure it shouldn't be a `break;`?
I should probably change this to a `break;` and see what tests break...
https://github.com/llvm/llvm-project/pull/100821
More information about the libcxx-commits
mailing list