[Mlir-commits] [mlir] [mlir][tblgen] Error on unsubstituted $_self in op trait predicates (PR #227263)
Mehdi Amini
llvmlistbot at llvm.org
Tue Sep 29 03:52:55 PDT 2026
================
@@ -3764,10 +3764,20 @@ void OpEmitter::genVerifier() {
for (auto &trait : op.getTraits()) {
if (auto *t = dyn_cast<tblgen::PredTrait>(&trait)) {
+ // Trait predicates expand against the whole operation, so $_self is not
+ // substituted here; catch it and report at the ODS level instead
+ std::string pred = tgfmt(t->getPredTemplate(), &verifyCtx);
----------------
joker-eph wrote:
Why only check this particular template while we have dozens other?
https://github.com/llvm/llvm-project/pull/227263
More information about the Mlir-commits
mailing list