Skip to content

Commit

Permalink
[FileCheck] Simplify a use of StringRef::consume_front (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Feb 4, 2024
1 parent ffaedc2 commit e7d3a4f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions llvm/lib/FileCheck/FileCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,7 @@ Expected<std::unique_ptr<Expression>> Pattern::parseNumericSubstitutionBlock(

// Parse matching constraint.
Expr = Expr.ltrim(SpaceChars);
bool HasParsedValidConstraint = false;
if (Expr.consume_front("=="))
HasParsedValidConstraint = true;
bool HasParsedValidConstraint = Expr.consume_front("==");

// Parse the expression itself.
Expr = Expr.ltrim(SpaceChars);
Expand Down

0 comments on commit e7d3a4f

Please sign in to comment.