Ticket #8476: boost-regex-fallthrough.patch

File boost-regex-fallthrough.patch, 4.7 KB (added by Alexander Kornienko <alexfh@…>, 9 years ago)
  • boost/regex/v4/basic_regex_creator.hpp

     
    738738      case syntax_element_long_set_rep:
    739739         // set the state_id of this repeat:
    740740         static_cast<re_repeat*>(state)->state_id = m_repeater_id++;
    741          // fall through:
    742741         BOOST_FALLTHROUGH;
    743742      case syntax_element_alt:
    744743         std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map));
    745744         static_cast<re_alt*>(state)->can_be_null = 0;
    746          // fall through:
    747745         BOOST_FALLTHROUGH;
    748746      case syntax_element_jump:
    749747         static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state);
    750          // fall through again:
    751748         BOOST_FALLTHROUGH;
    752749      default:
    753750         if(state->next.i)
     
    880877               }
    881878            }
    882879         }
     880         break;
    883881      default:
    884882         break;
    885883      }
     
    944942               e.raise();
    945943            }
    946944         }
    947          // fall through:
    948945         BOOST_FALLTHROUGH;
    949946      default:
    950947         state = state->next.p;
     
    11571154               break;
    11581155            }
    11591156            m_recursion_checks[recursion_sub] = true;
    1160             // fall through, can't handle nested recursion here...
     1157            // can't handle nested recursion here...
    11611158            BOOST_FALLTHROUGH;
    11621159         }
    11631160      case syntax_element_backref:
    11641161         // can be null, and any character can match:
    11651162         if(pnull)
    11661163            *pnull |= mask;
    1167          // fall through:
    11681164         BOOST_FALLTHROUGH;
    11691165      case syntax_element_wild:
    11701166      {
     
    13651361            state = state->next.p->next.p;
    13661362            break;
    13671363         }
    1368          // otherwise fall through:
    13691364         BOOST_FALLTHROUGH;
    13701365      default:
    13711366         state = state->next.p;
     
    14631458         if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT)
    14641459            m_bad_repeats |= (one << state_id);
    14651460      }
     1461      break;
    14661462   default:
    14671463      break;
    14681464   }
     
    15441540      case syntax_element_long_set_rep:
    15451541         if(this->m_has_backrefs == 0)
    15461542            static_cast<re_repeat*>(state)->leading = true;
    1547          // fall through:
    15481543         BOOST_FALLTHROUGH;
    15491544      default:
    15501545         return;
  • boost/regex/v4/basic_regex_parser.hpp

     
    369369         while((m_position != m_end) && !is_separator(*m_position++)){}
    370370         return true;
    371371      }
    372       // Otherwise fall through:
    373372      BOOST_FALLTHROUGH;
    374373   default:
    375374      result = parse_literal();
     
    624623         {
    625624         case 'w':
    626625            negate = false;
    627             // fall through:
    628626            BOOST_FALLTHROUGH;
    629627         case 'W':
    630628            {
     
    642640            }
    643641         case 's':
    644642            negate = false;
    645             // fall through:
    646643            BOOST_FALLTHROUGH;
    647644         case 'S':
    648645            return add_emacs_code(negate);
     
    675672   {
    676673   case regex_constants::escape_type_not_class:
    677674      negate = true;
    678       // fall through:
    679675      BOOST_FALLTHROUGH;
    680676   case regex_constants::escape_type_class:
    681677      {
     
    746742      break;
    747743   case regex_constants::escape_type_not_property:
    748744      negate = true;
    749       // fall through:
    750745      BOOST_FALLTHROUGH;
    751746   case regex_constants::escape_type_property:
    752747      {
     
    906901   case regex_constants::escape_type_control_v:
    907902      if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
    908903         goto escape_type_class_jump;
    909       // fallthrough:
     904      BOOST_FALLTHROUGH;
    910905   default:
    911906      this->append_literal(unescape_character());
    912907      break;
     
    19641959   {
    19651960   case regex_constants::syntax_or:
    19661961      m_mark_reset = m_mark_count;
    1967       // fall through:
    19681962      BOOST_FALLTHROUGH;
    19691963   case regex_constants::syntax_colon:
    19701964      //
  • boost/regex/v4/regex_format.hpp

     
    283283            format_perl();
    284284            break;
    285285         }
    286          // fall through, not a special character:
     286         // not a special character:
    287287         BOOST_FALLTHROUGH;
    288288      default:
    289289         put(*m_position);
     
    355355   case '{':
    356356      have_brace = true;
    357357      ++m_position;
    358       // fall through....
    359358      BOOST_FALLTHROUGH;
    360359   default:
    361360      // see if we have a number: