diff --git a/mlir/include/mlir/IR/SymbolInterfaces.td b/mlir/include/mlir/IR/SymbolInterfaces.td --- a/mlir/include/mlir/IR/SymbolInterfaces.td +++ b/mlir/include/mlir/IR/SymbolInterfaces.td @@ -178,10 +178,10 @@ let extraClassDeclaration = [{ /// Custom classof that handles the case where the symbol is optional. static bool classof(Operation *op) { - auto *concept = getInterfaceFor(op); - if (!concept) + auto *opConcept = getInterfaceFor(op); + if (!opConcept) return false; - return !concept->isOptionalSymbol(concept, op) || + return !opConcept->isOptionalSymbol(opConcept, op) || op->getAttr(::mlir::SymbolTable::getSymbolAttrName()); } }];