diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -322,12 +322,11 @@ protected: /// Return the ultimate Operation being worked on. Operation *getOperation() { - // We have to cast up to the trait type, then to the concrete type, then to + // We have to cast up to the concrete trait type, then to // the BaseState class in explicit hops because the concrete type will // multiply derive from the (content free) TraitBase class, and we need to // be able to disambiguate the path for the C++ compiler. - auto *trait = static_cast *>(this); - auto *concrete = static_cast(trait); + auto *concrete = static_cast(this); auto *base = static_cast(concrete); return base->getOperation(); }