[clang] [BoundsSafety] Small fixes to BoundsSafety.rst (PR #177961)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 26 05:55:18 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Hans Wennborg (zmodem)
<details>
<summary>Changes</summary>
While reading the doc I noticed a few things that weren't rendered right in the html output.
---
Full diff: https://github.com/llvm/llvm-project/pull/177961.diff
1 Files Affected:
- (modified) clang/docs/BoundsSafety.rst (+9-9)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/177961
More information about the cfe-commits
mailing list