[llvm] [mlir] Add missing return on nullptr check (PR #92125)

Oleksandr Alex Zinenko via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 11:56:20 PDT 2024


================
@@ -654,7 +654,7 @@ LogicalResult transform::ApplyConversionPatternsOp::verify() {
       InFlightDiagnostic diag = emitOpError()
                                 << "expected default converter child op to "
                                    "implement TypeConverterBuilderOpInterface";
-      diag.attachNote(typeConverterOp->getLoc()) << "op without interface";
+      diag.attachNote(typeConverterRegion.front().front()->getLoc()) << "op without interface";
----------------
ftynse wrote:

Also, let's factor out the `typeConverterRegion.front().front()` part into a `Operation *maybeTypeConverter` variable above.

https://github.com/llvm/llvm-project/pull/92125


More information about the llvm-commits mailing list