[Mlir-commits] [mlir] Add support for enum doc gen (PR #98885)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jul 15 04:17:53 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 03d8f9588f143972c0d6af16a8dd8b6a2bfbf1f8 41c2c0c0c8915c5530e0aead04ff9c3e3befa4d8 --extensions cpp -- mlir/tools/mlir-tblgen/OpDocGen.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/tools/mlir-tblgen/OpDocGen.cpp b/mlir/tools/mlir-tblgen/OpDocGen.cpp
index d55414d7b9..f7144f731c 100644
--- a/mlir/tools/mlir-tblgen/OpDocGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDocGen.cpp
@@ -400,7 +400,7 @@ static void emitEnumDoc(const EnumAttr &def, raw_ostream &os) {
      << "| :----: | :---: | ------ |\n";
   for (const auto &it : cases) {
     os << "| " << it.getSymbol() << " | `" << it.getValue() << "` | "
-        << it.getStr() << " |\n";
+       << it.getStr() << " |\n";
   }
 
   os << "\n";
@@ -411,7 +411,8 @@ static void emitEnumDoc(const RecordKeeper &recordKeeper, raw_ostream &os) {
       recordKeeper.getAllDerivedDefinitions("EnumAttr");
 
   os << "<!-- Autogenerated by mlir-tblgen; don't manually edit -->\n";
-  for (const llvm::Record *def : defs) emitEnumDoc(EnumAttr(def), os);
+  for (const llvm::Record *def : defs)
+    emitEnumDoc(EnumAttr(def), os);
 }
 
 //===----------------------------------------------------------------------===//

``````````

</details>


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


More information about the Mlir-commits mailing list