[Mlir-commits] [mlir] c4e70c2 - [MLIR] Apply clang-tidy fixes for llvm-qualified-auto in AttrOrTypeFormatGen.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Mon Sep 1 10:48:51 PDT 2025
Author: Mehdi Amini
Date: 2025-09-01T10:45:09-07:00
New Revision: c4e70c28a3c2481181f21eb67b3f357d73e71fc3
URL: https://github.com/llvm/llvm-project/commit/c4e70c28a3c2481181f21eb67b3f357d73e71fc3
DIFF: https://github.com/llvm/llvm-project/commit/c4e70c28a3c2481181f21eb67b3f357d73e71fc3.diff
LOG: [MLIR] Apply clang-tidy fixes for llvm-qualified-auto in AttrOrTypeFormatGen.cpp (NFC)
Added:
Modified:
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
index 10a162f81ba13..a1899a81afcce 100644
--- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
@@ -585,7 +585,7 @@ void DefFormat::genStructParser(StructDirective *el, FmtContext &ctx,
os.getStream().printReindented(strfmt(checkParamKey, param->getName()));
if (isa<ParameterElement>(arg))
genVariableParser(param, ctx, os.indent());
- else if (auto custom = dyn_cast<CustomDirective>(arg))
+ else if (auto *custom = dyn_cast<CustomDirective>(arg))
genCustomParser(custom, ctx, os.indent());
os.unindent() << "} else ";
// Print the check for duplicate or unknown parameter.
@@ -877,9 +877,9 @@ void DefFormat::genCommaSeparatedPrinter(
extra(arg);
shouldEmitSpace = false;
lastWasPunctuation = true;
- if (auto realParam = dyn_cast<ParameterElement>(arg))
+ if (auto *realParam = dyn_cast<ParameterElement>(arg))
genVariablePrinter(realParam, ctx, os);
- else if (auto custom = dyn_cast<CustomDirective>(arg))
+ else if (auto *custom = dyn_cast<CustomDirective>(arg))
genCustomPrinter(custom, ctx, os);
if (param->isOptional())
os.unindent() << "}\n";
@@ -1124,7 +1124,7 @@ DefFormatParser::verifyStructArguments(SMLoc loc,
return emitError(loc, "expected a parameter, custom directive or params "
"directive in `struct` arguments list");
}
- if (auto custom = dyn_cast<CustomDirective>(el)) {
+ if (auto *custom = dyn_cast<CustomDirective>(el)) {
if (custom->getNumElements() != 1) {
return emitError(loc, "`struct` can only contain `custom` directives "
"with a single argument");
More information about the Mlir-commits
mailing list