Skip to content

Commit da170ac

Browse files
committed
Fix uncatched missing brackets
1 parent 122d5ae commit da170ac

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

mlir/lib/Query/Matcher/Parser.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,13 @@ bool Parser::parseMatcherExpressionImpl(const TokenInfo &nameToken,
378378
return false;
379379
}
380380

381+
// Check for the missing closing parenthesis
382+
if (endToken.kind != TokenInfo::TK_CloseParen) {
383+
error->addError(openToken.range, error->ET_ParserNoCloseParen)
384+
<< nameToken.text;
385+
return false;
386+
}
387+
381388
if (!ctor)
382389
return false;
383390
// Merge the start and end infos.

0 commit comments

Comments
 (0)