[clang] [Clang][Docs] Documented sentinel attribute (PR #196088)
Tony Guillot via cfe-commits
cfe-commits at lists.llvm.org
Wed May 27 09:08:51 PDT 2026
================
@@ -10000,3 +10000,31 @@ different languages to coexist on the same call stack while each interpreting
exceptions according to their own rules.
}];
}
+
+def SentinelDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sentinel`` attribute can only be applied to variadic functions to
+diagnose each function call that do not pass a sentinel value at the end of the
+argument list. It checks if a null pointer constant exists at the end of the
+argument list by default, or at the (N+1)th position starting from the end when
----------------
to268 wrote:
I have filled #200007 about the sentinel attribute behaving differently with variadic functions with an explicit object parameter.
https://github.com/llvm/llvm-project/pull/196088
More information about the cfe-commits
mailing list