================ @@ -282,40 +283,55 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, - llvm::SmallVector<mlir::Type> ¶ms, - bool &isVarArg) { +// A special parser is needed for function returning void to handle the missing +// type. +static mlir::ParseResult parseFuncTypeReturn(mlir::AsmParser &p, + mlir::Type &optionalReturnType) { + if (succeeded(p.parseOptionalArrow())) { ---------------- erichkeane wrote:
```suggestion // If `->` is found, it must be followed by the return type. if (succeeded(p.parseOptionalArrow())) return p.parseType(optionalReturnType); ``` https://github.com/llvm/llvm-project/pull/128787 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits