// DEF: void AOp::setAAttrAttr(some-attr-kind attr) {
// DEF-NEXT: (*this)->setAttr(getAAttrAttrName(), attr);
// DEF: void AOp::setAAttr(some-return-type attrValue) {
-// DEF-NEXT: (*this)->setAttr(getAAttrAttrName(), some-const-builder-call(::mlir::Builder(getContext()), attrValue));
+// DEF-NEXT: (*this)->setAttr(getAAttrAttrName(), some-const-builder-call(::mlir::Builder((*this)->getContext()), attrValue));
// DEF: void AOp::setBAttrAttr(some-attr-kind attr) {
// DEF-NEXT: (*this)->setAttr(getBAttrAttrName(), attr);
// DEF: void AOp::setBAttr(some-return-type attrValue) {
-// DEF-NEXT: (*this)->setAttr(getBAttrAttrName(), some-const-builder-call(::mlir::Builder(getContext()), attrValue));
+// DEF-NEXT: (*this)->setAttr(getBAttrAttrName(), some-const-builder-call(::mlir::Builder((*this)->getContext()), attrValue));
// DEF: void AOp::setCAttrAttr(some-attr-kind attr) {
// DEF-NEXT: (*this)->setAttr(getCAttrAttrName(), attr);
// DEF: void AOp::setCAttr(::llvm::Optional<some-return-type> attrValue) {
// DEF-NEXT: if (attrValue)
-// DEF-NEXT: return (*this)->setAttr(getCAttrAttrName(), some-const-builder-call(::mlir::Builder(getContext()), *attrValue));
+// DEF-NEXT: return (*this)->setAttr(getCAttrAttrName(), some-const-builder-call(::mlir::Builder((*this)->getContext()), *attrValue));
// DEF-NEXT: (*this)->removeAttr(getCAttrAttrName());
// Test remove methods
if (!canUseUnwrappedRawValue(baseAttr))
return;
FmtContext fctx;
- fctx.withBuilder("::mlir::Builder(getContext())");
+ fctx.withBuilder("::mlir::Builder((*this)->getContext())");
bool isUnitAttr = attr.getAttrDefName() == "UnitAttr";
bool isOptional = attr.isOptional();