aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/FileCheck/FileCheck.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-02-04 14:57:28 -0800
committerKazu Hirata <kazu@google.com>2024-02-04 14:57:28 -0800
commite7d3a4f34adbe9ea183c2ec4aea97691d4ec06f5 (patch)
tree6f84b5da1d1ae647660f4d7f0e059a377d467033 /llvm/lib/FileCheck/FileCheck.cpp
parentffaedc2735cfcf2595fe65a75ed910a9c661391b (diff)
downloadllvm-e7d3a4f34adbe9ea183c2ec4aea97691d4ec06f5.zip
llvm-e7d3a4f34adbe9ea183c2ec4aea97691d4ec06f5.tar.gz
llvm-e7d3a4f34adbe9ea183c2ec4aea97691d4ec06f5.tar.bz2
[FileCheck] Simplify a use of StringRef::consume_front (NFC)
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
-rw-r--r--llvm/lib/FileCheck/FileCheck.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp
index 221fcff..6d3a2b9 100644
--- a/llvm/lib/FileCheck/FileCheck.cpp
+++ b/llvm/lib/FileCheck/FileCheck.cpp
@@ -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);