[clang] [BoundsSafety][doc] Fix a typo (PR #126247)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 7 06:27:53 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Piotr Fusik (pfusik)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/126247.diff
2 Files Affected:
- (modified) clang/docs/BoundsSafety.rst (+3-3)
- (modified) clang/docs/BoundsSafetyImplPlans.rst (+1-1)
``````````diff
diff --git a/clang/docs/BoundsSafety.rst b/clang/docs/BoundsSafety.rst
index e24c69d8c7855f3..3d3d7ea3eb41be9 100644
--- a/clang/docs/BoundsSafety.rst
+++ b/clang/docs/BoundsSafety.rst
@@ -777,13 +777,13 @@ the transformed pseudo code of function ``alloc_buf()`` in the example below.
size_t count;
} sized_buf_t;
- void alloc_buf(sized_buf_t *sbuf, sized_t nelems) {
+ void alloc_buf(sized_buf_t *sbuf, size_t nelems) {
sbuf->buf = (int *)malloc(sizeof(int) * nelems);
sbuf->count = nelems;
}
// Transformed pseudo code:
- void alloc_buf(sized_buf_t *sbuf, sized_t nelems) {
+ void alloc_buf(sized_buf_t *sbuf, size_t nelems) {
// Materialize RHS values:
int *tmp_ptr = (int *)malloc(sizeof(int) * nelems);
int tmp_count = nelems;
@@ -1003,4 +1003,4 @@ Try it out
Your feedback on the programming model is valuable. You may want to follow the
instruction in :doc:`BoundsSafetyAdoptionGuide` to play with ``-fbounds-safety``
-and please send your feedback to `Yeoul Na <mailto:yeoul_na at apple.com>`_.
\ No newline at end of file
+and please send your feedback to `Yeoul Na <mailto:yeoul_na at apple.com>`_.
diff --git a/clang/docs/BoundsSafetyImplPlans.rst b/clang/docs/BoundsSafetyImplPlans.rst
index 93c2ed7b4340295..34276c920f31e2a 100644
--- a/clang/docs/BoundsSafetyImplPlans.rst
+++ b/clang/docs/BoundsSafetyImplPlans.rst
@@ -134,7 +134,7 @@ same basic block and without side effect in between.
int *__counted_by(count) buf; size_t count;
} sized_buf_t;
- void alloc_buf(sized_buf_t *sbuf, sized_t nelems) {
+ void alloc_buf(sized_buf_t *sbuf, size_t nelems) {
sbuf->buf = (int *)malloc(sizeof(int) * nelems);
sbuf->count = nelems;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/126247
More information about the cfe-commits
mailing list