[clang] [clang][docs] Fix typos concerning wasm __funcref (PR #124365)

Timothy Herchen via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 24 15:16:03 PST 2025


https://github.com/anematode created https://github.com/llvm/llvm-project/pull/124365

The docs conflate `__funcref` with an actual type in a couple places.

>From 2508da6fd7f38101011573460724f13df1c1616d Mon Sep 17 00:00:00 2001
From: Timothy Herchen <timothy.herchen at gmail.com>
Date: Fri, 24 Jan 2025 15:13:30 -0800
Subject: [PATCH] [clang][docs] Fix typos concerning wasm __funcref

---
 clang/docs/LanguageExtensions.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index c42b88015e2695..ddb11cc6efb232 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -2632,7 +2632,7 @@ with the current table size.
 .. code-block:: c++
 
   typedef void (*__funcref funcref_t)();
-  static __funcref table[0];
+  static funcref_t table[0];
 
   size_t getSize() {
     return __builtin_wasm_table_size(table);
@@ -2654,10 +2654,10 @@ or -1. It will return -1 if not enough space could be allocated.
 .. code-block:: c++
 
   typedef void (*__funcref funcref_t)();
-  static __funcref table[0];
+  static funcref_t table[0];
 
   // grow returns the new table size or -1 on error.
-  int grow(__funcref fn, int delta) {
+  int grow(funcref_t fn, int delta) {
     int prevSize = __builtin_wasm_table_grow(table, fn, delta);
     if (prevSize == -1)
       return -1;



More information about the cfe-commits mailing list