================
@@ -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:
I added this to keep the existing fallback diagnostic when parsing fails before
consuming any of the signature. In the missing `->` case, the parser has
already consumed `()` and emitted a more specific error, so without this check
we'd also emit the generic `expected direct call...` error.
The nearby `call_missing_ptr_type` test covers the no-progress case. I can add
a comment here if that would help.
https://github.com/llvm/llvm-project/pull/206215
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits