[Mlir-commits] [mlir] [mlir] Clarify type of optional operands in custom parse directive. (PR #123554)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Jan 19 23:12:11 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Philipp Schilk (schilkp)

<details>
<summary>Changes</summary>

A custom parse directive with optional operand has an `std::optional` argument - `Optional` is not valid in this context.

---
Full diff: https://github.com/llvm/llvm-project/pull/123554.diff


1 Files Affected:

- (modified) mlir/docs/DefiningDialects/Operations.md (+1-1) 


``````````diff
diff --git a/mlir/docs/DefiningDialects/Operations.md b/mlir/docs/DefiningDialects/Operations.md
index 8ff60ac21424c4..53c0ab1f08e227 100644
--- a/mlir/docs/DefiningDialects/Operations.md
+++ b/mlir/docs/DefiningDialects/Operations.md
@@ -867,7 +867,7 @@ declarative parameter to `parse` method argument is detailed below:
     -   Optional: `<Attribute-Storage-Type>(e.g. Attribute) &`
 *   Operand Variables
     -   Single: `OpAsmParser::UnresolvedOperand &`
-    -   Optional: `Optional<OpAsmParser::UnresolvedOperand> &`
+    -   Optional: `std::optional<OpAsmParser::UnresolvedOperand> &`
     -   Variadic: `SmallVectorImpl<OpAsmParser::UnresolvedOperand> &`
     -   VariadicOfVariadic:
         `SmallVectorImpl<SmallVector<OpAsmParser::UnresolvedOperand>> &`

``````````

</details>


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


More information about the Mlir-commits mailing list