[Mlir-commits] [mlir] de2f5bc - Apply clang-tidy fixes for llvm-qualified-auto in AsmPrinter.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Feb 15 10:19:42 PST 2024


Author: Mehdi Amini
Date: 2024-02-15T10:17:27-08:00
New Revision: de2f5bcd797a22bfa38791ac4e769ec194850560

URL: https://github.com/llvm/llvm-project/commit/de2f5bcd797a22bfa38791ac4e769ec194850560
DIFF: https://github.com/llvm/llvm-project/commit/de2f5bcd797a22bfa38791ac4e769ec194850560.diff

LOG: Apply clang-tidy fixes for llvm-qualified-auto in AsmPrinter.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/IR/AsmPrinter.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index 6bed90936465c8..8d75349f8eed45 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -1095,7 +1095,7 @@ std::pair<size_t, size_t> AliasInitializer::visitImpl(
 }
 
 void AliasInitializer::markAliasNonDeferrable(size_t aliasIndex) {
-  auto it = std::next(aliases.begin(), aliasIndex);
+  auto *it = std::next(aliases.begin(), aliasIndex);
 
   // If already marked non-deferrable stop the recursion.
   // All children should already be marked non-deferrable as well.
@@ -1190,7 +1190,7 @@ void AliasState::initialize(
 }
 
 LogicalResult AliasState::getAlias(Attribute attr, raw_ostream &os) const {
-  auto it = attrTypeToAlias.find(attr.getAsOpaquePointer());
+  const auto *it = attrTypeToAlias.find(attr.getAsOpaquePointer());
   if (it == attrTypeToAlias.end())
     return failure();
   it->second.print(os);
@@ -1198,7 +1198,7 @@ LogicalResult AliasState::getAlias(Attribute attr, raw_ostream &os) const {
 }
 
 LogicalResult AliasState::getAlias(Type ty, raw_ostream &os) const {
-  auto it = attrTypeToAlias.find(ty.getAsOpaquePointer());
+  const auto *it = attrTypeToAlias.find(ty.getAsOpaquePointer());
   if (it == attrTypeToAlias.end())
     return failure();
 


        


More information about the Mlir-commits mailing list