Skip to content

Commit 1a86c1e

Browse files
committed
[Parse] Remove redundant check
We already check this in `Parser::tryLexRegexLiteral`, and the failure case doesn't make sense here as we call `discardToken` afterwards.
1 parent f9a6a8b commit 1a86c1e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/Parse/Lexer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,9 +2081,6 @@ bool Lexer::tryLexRegexLiteral(const char *TokStart) {
20812081
}
20822082

20832083
void Lexer::tryLexForwardSlashRegexLiteralFrom(State S, bool mustBeRegex) {
2084-
if (!LangOpts.EnableBareSlashRegexLiterals)
2085-
return;
2086-
20872084
// Try re-lex with forward slash enabled.
20882085
llvm::SaveAndRestore<LexerForwardSlashRegexMode> RegexLexingScope(
20892086
ForwardSlashRegexMode, mustBeRegex

0 commit comments

Comments
 (0)