https://github.com/to268 created 
https://github.com/llvm/llvm-project/pull/205539

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

>From e041c44899ad78c2801ef17ac3310bca145cfccf Mon Sep 17 00:00:00 2001
From: Tony Guillot <[email protected]>
Date: Wed, 24 Jun 2026 14:00:55 +0200
Subject: [PATCH] Fixed sentinel attrs typos

---
 clang/include/clang/Basic/AttrDocs.td | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/include/clang/Basic/AttrDocs.td 
b/clang/include/clang/Basic/AttrDocs.td
index 04362de2d5be2..bc6a93002ead7 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -10173,7 +10173,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
@@ -10187,7 +10187,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