[clang] [BoundsSafety] Small fixes to BoundsSafety.rst (PR #177961)
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 26 05:54:48 PST 2026
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/177961
While reading the doc I noticed a few things that weren't rendered right in the html output.
>From ba137827db899654cde690a6701e8a32a5b86a22 Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans at chromium.org>
Date: Mon, 26 Jan 2026 14:53:30 +0100
Subject: [PATCH] [BoundsSafety] Small fixes to BoundsSafety.rst
---
clang/docs/BoundsSafety.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/clang/docs/BoundsSafety.rst b/clang/docs/BoundsSafety.rst
index e3cb78eecbea4..b82e68eb7555a 100644
--- a/clang/docs/BoundsSafety.rst
+++ b/clang/docs/BoundsSafety.rst
@@ -352,7 +352,7 @@ Annotations for sentinel-delimited arrays
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A C string is an array of characters. The null terminator — the first null
-character ('\0') element in the array — marks the end of the string.
+character (``'\0'``) element in the array — marks the end of the string.
``-fbounds-safety`` provides ``__null_terminated`` to annotate C strings and the
generalized form ``__terminated_by(T)`` to annotate pointers and arrays with an
end marked by a sentinel value. The model prevents dereferencing a
@@ -439,17 +439,17 @@ extension`_ for more details about the toolchain header):
.. code-block:: C
-#define __ptrcheck_abi_assume_single() \
- _Pragma("clang abi_ptr_attr set(single)")
+ #define __ptrcheck_abi_assume_single() \
+ _Pragma("clang abi_ptr_attr set(single)")
-#define __ptrcheck_abi_assume_indexable() \
- _Pragma("clang abi_ptr_attr set(indexable)")
+ #define __ptrcheck_abi_assume_indexable() \
+ _Pragma("clang abi_ptr_attr set(indexable)")
-#define __ptrcheck_abi_assume_bidi_indexable() \
- _Pragma("clang abi_ptr_attr set(bidi_indexable)")
+ #define __ptrcheck_abi_assume_bidi_indexable() \
+ _Pragma("clang abi_ptr_attr set(bidi_indexable)")
-#define __ptrcheck_abi_assume_unsafe_indexable() \
- _Pragma("clang abi_ptr_attr set(unsafe_indexable)")
+ #define __ptrcheck_abi_assume_unsafe_indexable() \
+ _Pragma("clang abi_ptr_attr set(unsafe_indexable)")
ABI implications of default bounds annotations
More information about the cfe-commits
mailing list