[llvm] e7d3a4f - [FileCheck] Simplify a use of StringRef::consume_front (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 4 14:57:41 PST 2024
Author: Kazu Hirata
Date: 2024-02-04T14:57:28-08:00
New Revision: e7d3a4f34adbe9ea183c2ec4aea97691d4ec06f5
URL: https://github.com/llvm/llvm-project/commit/e7d3a4f34adbe9ea183c2ec4aea97691d4ec06f5
DIFF: https://github.com/llvm/llvm-project/commit/e7d3a4f34adbe9ea183c2ec4aea97691d4ec06f5.diff
LOG: [FileCheck] Simplify a use of StringRef::consume_front (NFC)
Added:
Modified:
llvm/lib/FileCheck/FileCheck.cpp
Removed:
################################################################################
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp
index 221fcffa5e8c7..6d3a2b9cf46f7 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);
More information about the llvm-commits
mailing list