Ticket #8476: boost-regex-fallthrough.patch
File boost-regex-fallthrough.patch, 4.7 KB (added by , 9 years ago) |
---|
-
boost/regex/v4/basic_regex_creator.hpp
738 738 case syntax_element_long_set_rep: 739 739 // set the state_id of this repeat: 740 740 static_cast<re_repeat*>(state)->state_id = m_repeater_id++; 741 // fall through:742 741 BOOST_FALLTHROUGH; 743 742 case syntax_element_alt: 744 743 std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map)); 745 744 static_cast<re_alt*>(state)->can_be_null = 0; 746 // fall through:747 745 BOOST_FALLTHROUGH; 748 746 case syntax_element_jump: 749 747 static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state); 750 // fall through again:751 748 BOOST_FALLTHROUGH; 752 749 default: 753 750 if(state->next.i) … … 880 877 } 881 878 } 882 879 } 880 break; 883 881 default: 884 882 break; 885 883 } … … 944 942 e.raise(); 945 943 } 946 944 } 947 // fall through:948 945 BOOST_FALLTHROUGH; 949 946 default: 950 947 state = state->next.p; … … 1157 1154 break; 1158 1155 } 1159 1156 m_recursion_checks[recursion_sub] = true; 1160 // fall through,can't handle nested recursion here...1157 // can't handle nested recursion here... 1161 1158 BOOST_FALLTHROUGH; 1162 1159 } 1163 1160 case syntax_element_backref: 1164 1161 // can be null, and any character can match: 1165 1162 if(pnull) 1166 1163 *pnull |= mask; 1167 // fall through:1168 1164 BOOST_FALLTHROUGH; 1169 1165 case syntax_element_wild: 1170 1166 { … … 1365 1361 state = state->next.p->next.p; 1366 1362 break; 1367 1363 } 1368 // otherwise fall through:1369 1364 BOOST_FALLTHROUGH; 1370 1365 default: 1371 1366 state = state->next.p; … … 1463 1458 if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT) 1464 1459 m_bad_repeats |= (one << state_id); 1465 1460 } 1461 break; 1466 1462 default: 1467 1463 break; 1468 1464 } … … 1544 1540 case syntax_element_long_set_rep: 1545 1541 if(this->m_has_backrefs == 0) 1546 1542 static_cast<re_repeat*>(state)->leading = true; 1547 // fall through:1548 1543 BOOST_FALLTHROUGH; 1549 1544 default: 1550 1545 return; -
boost/regex/v4/basic_regex_parser.hpp
369 369 while((m_position != m_end) && !is_separator(*m_position++)){} 370 370 return true; 371 371 } 372 // Otherwise fall through:373 372 BOOST_FALLTHROUGH; 374 373 default: 375 374 result = parse_literal(); … … 624 623 { 625 624 case 'w': 626 625 negate = false; 627 // fall through:628 626 BOOST_FALLTHROUGH; 629 627 case 'W': 630 628 { … … 642 640 } 643 641 case 's': 644 642 negate = false; 645 // fall through:646 643 BOOST_FALLTHROUGH; 647 644 case 'S': 648 645 return add_emacs_code(negate); … … 675 672 { 676 673 case regex_constants::escape_type_not_class: 677 674 negate = true; 678 // fall through:679 675 BOOST_FALLTHROUGH; 680 676 case regex_constants::escape_type_class: 681 677 { … … 746 742 break; 747 743 case regex_constants::escape_type_not_property: 748 744 negate = true; 749 // fall through:750 745 BOOST_FALLTHROUGH; 751 746 case regex_constants::escape_type_property: 752 747 { … … 906 901 case regex_constants::escape_type_control_v: 907 902 if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 908 903 goto escape_type_class_jump; 909 // fallthrough:904 BOOST_FALLTHROUGH; 910 905 default: 911 906 this->append_literal(unescape_character()); 912 907 break; … … 1964 1959 { 1965 1960 case regex_constants::syntax_or: 1966 1961 m_mark_reset = m_mark_count; 1967 // fall through:1968 1962 BOOST_FALLTHROUGH; 1969 1963 case regex_constants::syntax_colon: 1970 1964 // -
boost/regex/v4/regex_format.hpp
283 283 format_perl(); 284 284 break; 285 285 } 286 // fall through,not a special character:286 // not a special character: 287 287 BOOST_FALLTHROUGH; 288 288 default: 289 289 put(*m_position); … … 355 355 case '{': 356 356 have_brace = true; 357 357 ++m_position; 358 // fall through....359 358 BOOST_FALLTHROUGH; 360 359 default: 361 360 // see if we have a number: