Skip to content

Commit 4bbd714

Browse files
committed
♻️ Add nodiscard modifier to utils::variantToValue
1 parent 882dbc2 commit 4bbd714

File tree

1 file changed

+3
-2
lines changed
  • mlir/include/mlir/Dialect/Utils

1 file changed

+3
-2
lines changed

mlir/include/mlir/Dialect/Utils/Utils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ constexpr auto TOLERANCE = 1e-15;
3030
* @param parameter The parameter as a variant (double or Value).
3131
* @return Value The parameter as a Value.
3232
*/
33-
inline Value variantToValue(OpBuilder& builder, const OperationState& state,
34-
const std::variant<double, Value>& parameter) {
33+
[[nodiscard]] inline Value
34+
variantToValue(OpBuilder& builder, const OperationState& state,
35+
const std::variant<double, Value>& parameter) {
3536
Value operand;
3637
if (std::holds_alternative<double>(parameter)) {
3738
operand = builder.create<arith::ConstantOp>(

0 commit comments

Comments
 (0)