[clang] [clang][CIR][docs] Fix a Python 3.8 compatibility issue in PostProcessCIRDocs.py (PR #192255)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 15 06:04:45 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Sirui Mu (Lancern)

<details>
<summary>Changes</summary>

This patch fixes a compatibility issue with Python 3.8 in the `PostProcessCIRDocs.py` script.

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


1 Files Affected:

- (modified) clang/docs/CIR/_raw/PostProcessCIRDocs.py (+3-3) 


``````````diff
diff --git a/clang/docs/CIR/_raw/PostProcessCIRDocs.py b/clang/docs/CIR/_raw/PostProcessCIRDocs.py
index 3cc2211301fdc..bfe6337e76e07 100644
--- a/clang/docs/CIR/_raw/PostProcessCIRDocs.py
+++ b/clang/docs/CIR/_raw/PostProcessCIRDocs.py
@@ -42,7 +42,7 @@
 if len(cir_docs_toctree) > 0:
     with open(INDEX_PATH, encoding="utf-8") as fp:
         index_content = fp.read()
-    index_content += f"""
+    index_content += """
 
 CIR Dialect Reference
 ==========================
@@ -51,7 +51,7 @@
     :numbered:
     :maxdepth: 1
 
-    {"\n    ".join(cir_docs_toctree)}
-"""
+    {}
+""".format("\n    ".join(cir_docs_toctree))
     with open(INDEX_OUTPUT_PATH, "w", encoding="utf-8") as fp:
         fp.write(index_content)

``````````

</details>


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


More information about the cfe-commits mailing list