aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/FileCheck/FileCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
-rw-r--r--llvm/lib/FileCheck/FileCheck.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp
index ec963c2..ebebe05 100644
--- a/llvm/lib/FileCheck/FileCheck.cpp
+++ b/llvm/lib/FileCheck/FileCheck.cpp
@@ -493,8 +493,7 @@ Expected<NumericVariable *> Pattern::parseNumericVariableDefinition(
// Detect collisions between string and numeric variables when the latter
// is created later than the former.
- if (Context->DefinedVariableTable.find(Name) !=
- Context->DefinedVariableTable.end())
+ if (Context->DefinedVariableTable.contains(Name))
return ErrorDiagnostic::get(
SM, Name, "string variable with name '" + Name + "' already exists");
@@ -1072,8 +1071,7 @@ bool Pattern::parsePattern(StringRef PatternStr, StringRef Prefix,
// Detect collisions between string and numeric variables when the
// former is created later than the latter.
- if (Context->GlobalNumericVariableTable.find(Name) !=
- Context->GlobalNumericVariableTable.end()) {
+ if (Context->GlobalNumericVariableTable.contains(Name)) {
SM.PrintMessage(
SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error,
"numeric variable with name '" + Name + "' already exists");
@@ -2753,8 +2751,7 @@ Error FileCheckPatternContext::defineCmdlineVariables(
// Detect collisions between string and numeric variables when the former
// is created later than the latter.
- if (GlobalNumericVariableTable.find(Name) !=
- GlobalNumericVariableTable.end()) {
+ if (GlobalNumericVariableTable.contains(Name)) {
Errs = joinErrors(std::move(Errs),
ErrorDiagnostic::get(SM, Name,
"numeric variable with name '" +