[libcxx-commits] [libcxx] fix(libcxx/**.py): fix invalid escape sequences (PR #94032)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 31 12:47:09 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Eisuke Kawashima (e-kwsm)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/94032.diff
3 Files Affected:
- (modified) libcxx/test/libcxx/transitive_includes.gen.py (+1-1)
- (modified) libcxx/utils/generate_escaped_output_table.py (+1-1)
- (modified) libcxx/utils/generate_width_estimation_table.py (+1-1)
``````````diff
diff --git a/libcxx/test/libcxx/transitive_includes.gen.py b/libcxx/test/libcxx/transitive_includes.gen.py
index a67cab693b6e2..b5e91fb8ceb50 100644
--- a/libcxx/test/libcxx/transitive_includes.gen.py
+++ b/libcxx/test/libcxx/transitive_includes.gen.py
@@ -59,7 +59,7 @@
continue
# Escape slashes for the awk command below
- escaped_header = header.replace('/', '\/')
+ escaped_header = header.replace('/', r'\/')
print(f"""\
//--- {header}.sh.cpp
diff --git a/libcxx/utils/generate_escaped_output_table.py b/libcxx/utils/generate_escaped_output_table.py
index 523a0be3a451d..9e7ea814ee221 100755
--- a/libcxx/utils/generate_escaped_output_table.py
+++ b/libcxx/utils/generate_escaped_output_table.py
@@ -84,7 +84,7 @@ def compactPropertyRanges(input: list[PropertyRange]) -> list[PropertyRange]:
return result
-DATA_ARRAY_TEMPLATE = """
+DATA_ARRAY_TEMPLATE = r"""
/// The entries of the characters to escape in format's debug string.
///
/// Contains the entries for [format.string.escaped]/2.2.1.2.1
diff --git a/libcxx/utils/generate_width_estimation_table.py b/libcxx/utils/generate_width_estimation_table.py
index 918dae25fe49e..b23b7378ac0c0 100644
--- a/libcxx/utils/generate_width_estimation_table.py
+++ b/libcxx/utils/generate_width_estimation_table.py
@@ -99,7 +99,7 @@ def compactPropertyRanges(input: list[PropertyRange]) -> list[PropertyRange]:
return result
-DATA_ARRAY_TEMPLATE = """
+DATA_ARRAY_TEMPLATE = r"""
/// The entries of the characters with an estimated width of 2.
///
/// Contains the entries for [format.string.std]/12
``````````
</details>
https://github.com/llvm/llvm-project/pull/94032
More information about the libcxx-commits
mailing list