[clang] [Clang][Docs] Fixed typos of sentinel attribute (PR #205539)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 05:10:41 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Tony Guillot (to268)
<details>
<summary>Changes</summary>
I have previously documented the sentinel attribute but some typos have been missed during the review process.
---
Full diff: https://github.com/llvm/llvm-project/pull/205539.diff
1 Files Affected:
- (modified) clang/include/clang/Basic/AttrDocs.td (+2-2)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/205539
More information about the cfe-commits
mailing list