[Mlir-commits] [mlir] dfe1759 - Apply clang-tidy fixes for llvm-qualified-auto in CodeGenHelpers.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Thu Feb 15 16:03:22 PST 2024
Author: Mehdi Amini
Date: 2024-02-15T16:02:40-08:00
New Revision: dfe1759614a591601609ae0a948a681cd919c0f6
URL: https://github.com/llvm/llvm-project/commit/dfe1759614a591601609ae0a948a681cd919c0f6
DIFF: https://github.com/llvm/llvm-project/commit/dfe1759614a591601609ae0a948a681cd919c0f6.diff
LOG: Apply clang-tidy fixes for llvm-qualified-auto in CodeGenHelpers.cpp (NFC)
Added:
Modified:
mlir/lib/TableGen/CodeGenHelpers.cpp
Removed:
################################################################################
diff --git a/mlir/lib/TableGen/CodeGenHelpers.cpp b/mlir/lib/TableGen/CodeGenHelpers.cpp
index 371da8272029a0..d906de6b56afc0 100644
--- a/mlir/lib/TableGen/CodeGenHelpers.cpp
+++ b/mlir/lib/TableGen/CodeGenHelpers.cpp
@@ -71,7 +71,7 @@ void StaticVerifierFunctionEmitter::emitPatternConstraints(
StringRef StaticVerifierFunctionEmitter::getTypeConstraintFn(
const Constraint &constraint) const {
- auto it = typeConstraints.find(constraint);
+ const auto *it = typeConstraints.find(constraint);
assert(it != typeConstraints.end() && "expected to find a type constraint");
return it->second;
}
@@ -80,14 +80,14 @@ StringRef StaticVerifierFunctionEmitter::getTypeConstraintFn(
// be uniqued, return std::nullopt if one was not found.
std::optional<StringRef> StaticVerifierFunctionEmitter::getAttrConstraintFn(
const Constraint &constraint) const {
- auto it = attrConstraints.find(constraint);
+ const auto *it = attrConstraints.find(constraint);
return it == attrConstraints.end() ? std::optional<StringRef>()
: StringRef(it->second);
}
StringRef StaticVerifierFunctionEmitter::getSuccessorConstraintFn(
const Constraint &constraint) const {
- auto it = successorConstraints.find(constraint);
+ const auto *it = successorConstraints.find(constraint);
assert(it != successorConstraints.end() &&
"expected to find a sucessor constraint");
return it->second;
@@ -95,7 +95,7 @@ StringRef StaticVerifierFunctionEmitter::getSuccessorConstraintFn(
StringRef StaticVerifierFunctionEmitter::getRegionConstraintFn(
const Constraint &constraint) const {
- auto it = regionConstraints.find(constraint);
+ const auto *it = regionConstraints.find(constraint);
assert(it != regionConstraints.end() &&
"expected to find a region constraint");
return it->second;
@@ -261,7 +261,7 @@ std::string StaticVerifierFunctionEmitter::getUniqueName(StringRef kind,
void StaticVerifierFunctionEmitter::collectConstraint(ConstraintMap &map,
StringRef kind,
Constraint constraint) {
- auto it = map.find(constraint);
+ auto *it = map.find(constraint);
if (it == map.end())
map.insert({constraint, getUniqueName(kind, map.size())});
}
More information about the Mlir-commits
mailing list