[libcxx-commits] [libcxx] 88184e5 - [libc++] Fix invalid escape sequences in Python comments (#94032)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 10 06:38:34 PDT 2024
Author: Eisuke Kawashima
Date: 2024-06-10T09:38:31-04:00
New Revision: 88184e5060d7b5b38f9a5671b52318eb101444d0
URL: https://github.com/llvm/llvm-project/commit/88184e5060d7b5b38f9a5671b52318eb101444d0
DIFF: https://github.com/llvm/llvm-project/commit/88184e5060d7b5b38f9a5671b52318eb101444d0.diff
LOG: [libc++] Fix invalid escape sequences in Python comments (#94032)
Added:
Modified:
libcxx/include/__format/escaped_output_table.h
libcxx/include/__format/width_estimation_table.h
libcxx/utils/generate_escaped_output_table.py
libcxx/utils/generate_width_estimation_table.py
Removed:
################################################################################
diff --git a/libcxx/include/__format/escaped_output_table.h b/libcxx/include/__format/escaped_output_table.h
index 6aa91c89defa5..f7be2dc61f21a 100644
--- a/libcxx/include/__format/escaped_output_table.h
+++ b/libcxx/include/__format/escaped_output_table.h
@@ -833,7 +833,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr uint32_t __entries[711] = {
/// more details.
///
-/// \pre The code point is a valid Unicode code point.
+/// \\pre The code point is a valid Unicode code point.
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool __needs_escape(const char32_t __code_point) noexcept {
// The entries in the gap at the end.
diff --git a/libcxx/include/__format/width_estimation_table.h b/libcxx/include/__format/width_estimation_table.h
index c9a9f6719c610..11f61dea18d69 100644
--- a/libcxx/include/__format/width_estimation_table.h
+++ b/libcxx/include/__format/width_estimation_table.h
@@ -237,7 +237,7 @@ inline constexpr uint32_t __table_upper_bound = 0x0003fffd;
/// Returns the estimated width of a Unicode code point.
///
-/// \pre The code point is a valid Unicode code point.
+/// \\pre The code point is a valid Unicode code point.
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr int __estimated_width(const char32_t __code_point) noexcept {
// Since __table_upper_bound contains the unshifted range do the
// comparison without shifting.
diff --git a/libcxx/utils/generate_escaped_output_table.py b/libcxx/utils/generate_escaped_output_table.py
index c0b21f7731f64..9dcecaa5575cd 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 2fe51490449dd..f4cce1071d1f1 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
More information about the libcxx-commits
mailing list