[clang] 3a66eba - [BoundsSafety][doc] Fix a typo (#126247)

via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 9 23:55:30 PST 2025


Author: Piotr Fusik
Date: 2025-02-10T15:55:27+08:00
New Revision: 3a66ebae06d72d500c52413b9b189e95762e01b3

URL: https://github.com/llvm/llvm-project/commit/3a66ebae06d72d500c52413b9b189e95762e01b3
DIFF: https://github.com/llvm/llvm-project/commit/3a66ebae06d72d500c52413b9b189e95762e01b3.diff

LOG: [BoundsSafety][doc] Fix a typo (#126247)

Added: 
    

Modified: 
    clang/docs/BoundsSafety.rst
    clang/docs/BoundsSafetyImplPlans.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/BoundsSafety.rst b/clang/docs/BoundsSafety.rst
index 8635bec6e17c73a..cf5b0c75c0387d9 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;

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