[clang] [BoundsSafety][doc] Fix a typo (PR #126247)

Piotr Fusik via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 7 06:27:01 PST 2025


https://github.com/pfusik created https://github.com/llvm/llvm-project/pull/126247

None

>From 7aa0008aafc776941151dec16f52725b8958e730 Mon Sep 17 00:00:00 2001
From: Piotr Fusik <p.fusik at samsung.com>
Date: Fri, 7 Feb 2025 15:19:11 +0100
Subject: [PATCH] [BoundsSafety][doc] Fix a typo

---
 clang/docs/BoundsSafety.rst          | 6 +++---
 clang/docs/BoundsSafetyImplPlans.rst | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

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;
    }



More information about the cfe-commits mailing list