================
@@ -3096,6 +3096,23 @@ static mlir::ParseResult parseTryHandlerRegions(
   return mlir::success();
 }
 
+//===----------------------------------------------------------------------===//
+// CatchParamOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult cir::CatchParamOp::verify() {
+  std::optional<cir::CatchParamKind> kind = getKind();
+  if (getExceptionPtr()) {
+    if (!kind || *kind != cir::CatchParamKind::Begin)
+      return emitOpError("needs 'begin' to work with exception pointer");
----------------
xlauko wrote:

Took me a while to get this error message. I parsed it as `begin` needs to work 
with exception pointer. Can we rewrite it to something like:
```suggestion
      return emitOpError("with exception pointer must be of `begin` kind");
```

https://github.com/llvm/llvm-project/pull/165110
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to