[clang] [Clang][Builtins] Support typedefs and struct tags in LibBuiltin prototypes (PR #231696)
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 10 09:49:11 PST 2026
================
@@ -1507,11 +1498,6 @@ void Sema::checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD,
case Builtin::BIrecv:
case Builtin::BIrecvfrom: {
- unsigned ExpectedArgs = BuiltinID == Builtin::BIrecv ? 4 : 6;
- if (TheCall->getNumArgs() != ExpectedArgs ||
- !TheCall->getArg(1)->getType()->isPointerType() ||
- !TheCall->getArg(2)->getType()->isIntegerType())
- return;
DiagID = diag::warn_fortify_source_size_mismatch;
AccessSize = Checker.ComputeExplicitObjectSizeArgument(2);
BufferSize = Checker.ComputeSizeArgument(1);
----------------
nickdesaulniers wrote:
Maybe you meant for `poll`/`ppoll` below? https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_types.h.html doen't mandate that, as it does for other POSIX types.
Ah, but https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/poll.h.html#tag_14_37 does:
> nfds_t An unsigned integer type used for the number of file descriptors.
https://github.com/llvm/llvm-project/pull/231696
More information about the cfe-commits
mailing list