Author: Tony Guillot
Date: 2026-06-24T15:31:56+02:00
New Revision: 4adb32bbca24fbcd247e0725992024d922a94303

URL: 
https://github.com/llvm/llvm-project/commit/4adb32bbca24fbcd247e0725992024d922a94303
DIFF: 
https://github.com/llvm/llvm-project/commit/4adb32bbca24fbcd247e0725992024d922a94303.diff

LOG: [Clang][Docs] Fixed typos of sentinel attribute (#205539)

I have previously documented the sentinel attribute but some typos have
been missed during the review process.

Added: 
    

Modified: 
    clang/include/clang/Basic/AttrDocs.td

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/AttrDocs.td 
b/clang/include/clang/Basic/AttrDocs.td
index 0f1a66ec34197..7c1c88241aaa8 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -10200,7 +10200,7 @@ call. The attribute accepts two optional arguments: the 
first argument is the
 position of the expected sentinel value, starting from the last parameter. The
 second argument describes whether the last fixed parameter is treated as a
 valid sentinel value when set to '1'.
-All arguments described above defaults to '0' when elided.
+All arguments described above default to '0' when elided.
 The attribute is also supported with blocks and in Objective-C.
 
 .. code-block:: c
@@ -10214,7 +10214,7 @@ The attribute is also supported with blocks and in 
Objective-C.
     foo("Another", "example", NULL);
     foo("Missing", "sentinel"); // Not OK
 
-    bar(1, 2, NULL, 3);         // OK: sentinel value at the 2nd to last 
positon
+    bar(1, 2, NULL, 3);         // OK: sentinel value at the 2nd to last 
position
     bar(1, 2, 3, nullptr, 4);   // OK: `nullptr` is valid in C23
     bar(1, 2, 3, 4, NULL);      // Not OK
 


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to