[clang] [flang] [mlir] [mlir] Diagnose missing call result arrow (PR #206215)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 11 12:56:42 PDT 2026


================
@@ -1388,8 +1388,11 @@ static ParseResult parseCallTypeAndResolveOperands(
   }
   SmallVector<Type> argTypes;
   SmallVector<Type> resTypes;
+  SMLoc signatureLoc = parser.getCurrentLocation();
   if (call_interface_impl::parseFunctionSignature(parser, argTypes, argAttrs,
                                                   resTypes, resultAttrs)) {
+    if (parser.getCurrentLocation() != signatureLoc)
----------------
mygitljf wrote:

You're right. parseFunctionSignature was emitting the diagnostic but still returning success, which made callers compensate for it. I've changed it to return failure after reporting the error, and the callers now propagate that failure directly.

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


More information about the cfe-commits mailing list