[Mlir-commits] [mlir] [mlir][vector] Allow integer indices in vector.extract/insert ops (PR #115808)

Matthias Springer llvmlistbot at llvm.org
Thu Jan 9 01:27:01 PST 2025


================
@@ -340,12 +340,16 @@ class AsmParserImpl : public BaseT {
   /// Parse a list of comma-separated items with an optional delimiter.  If a
   /// delimiter is provided, then an empty list is allowed.  If not, then at
   /// least one element will be parsed.
-  ParseResult parseCommaSeparatedList(Delimiter delimiter,
-                                      function_ref<ParseResult()> parseElt,
-                                      StringRef contextMessage) override {
-    return parser.parseCommaSeparatedList(delimiter, parseElt, contextMessage);
+  ParseResult parseCommaSeparatedList(
+      Delimiter delimiter, function_ref<ParseResult()> parseElt,
+      std::optional<function_ref<ParseResult()>> parseSuffix,
----------------
matthias-springer wrote:

Can you move `parseSuffix` to the end and make it `function_ref<ParseResult()> parseSuffix = nullptr`? `function_ref` is rarely used with `std::optional`. Also, maybe this function would not be needed at all then?

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


More information about the Mlir-commits mailing list