mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
Libraries: Fix -Wunreachable-code warnings from clang
This commit is contained in:
parent
96666f3209
commit
b8dc3661ac
10 changed files with 7 additions and 27 deletions
|
@ -847,8 +847,6 @@ Token Lexer::force_slash_as_regex()
|
|||
|
||||
TokenType Lexer::consume_regex_literal()
|
||||
{
|
||||
TokenType token_type = TokenType::RegexLiteral;
|
||||
|
||||
while (!is_eof()) {
|
||||
if (is_line_terminator() || (!m_regex_is_in_character_class && m_current_char == '/')) {
|
||||
break;
|
||||
|
@ -868,10 +866,9 @@ TokenType Lexer::consume_regex_literal()
|
|||
if (m_current_char == '/') {
|
||||
consume();
|
||||
return TokenType::RegexLiteral;
|
||||
} else {
|
||||
return TokenType::UnterminatedRegexLiteral;
|
||||
}
|
||||
return token_type;
|
||||
|
||||
return TokenType::UnterminatedRegexLiteral;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue