[Mlir-commits] [mlir] [mlir][OpFormatGen][NFC] Initialize C-style arrays upon creation (PR #85631)

Mehdi Amini llvmlistbot at llvm.org
Wed Mar 20 10:35:20 PDT 2024


================
@@ -842,7 +842,7 @@ static void genElementParserStorage(FormatElement *element, const Operator &op,
       }
     } else {
       body << "  ::mlir::OpAsmParser::UnresolvedOperand " << name
-           << "RawOperands[1];\n"
+           << "RawOperands[1] = {};\n"
            << "  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> "
            << name << "Operands(" << name << "RawOperands);";
----------------
joker-eph wrote:

> I don't think so

But did you try? Because I did and `ninja check-mlir` is passing for me: https://github.com/llvm/llvm-project/commit/b44b9f71ecf51443b163e02f6bb64462cb437ae7

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


More information about the Mlir-commits mailing list