[clang] 9bf582f - [clang][docs] Fix typos concerning wasm __funcref (#124365)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 18 14:55:41 PST 2025


Author: Timothy Herchen
Date: 2025-02-18T14:55:38-08:00
New Revision: 9bf582fc090f28c2423fdf472635c39145a13bc9

URL: https://github.com/llvm/llvm-project/commit/9bf582fc090f28c2423fdf472635c39145a13bc9
DIFF: https://github.com/llvm/llvm-project/commit/9bf582fc090f28c2423fdf472635c39145a13bc9.diff

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

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

Added: 
    

Modified: 
    clang/docs/LanguageExtensions.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 2a956ad5b2909..5d9b68d4a7f2a 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -2629,7 +2629,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);
@@ -2651,10 +2651,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