[clang] [Clang][Builtins] Support typedefs and struct tags in LibBuiltin prototypes (PR #231696)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 3 12:02:22 PST 2026
================
@@ -1698,21 +1663,13 @@ void Sema::checkFortifiedLibcArgument(FunctionDecl *FD, CallExpr *TheCall) {
return;
// Recognize the libc function by builtin identity rather than by name and
- // system-header origin. umask is a LibBuiltin marked IgnoreSignature, so the
- // builtin id is attached to any file-scope, C-linkage declaration of umask
- // regardless of the libc's mode_t spelling -- including a hand-written
- // forward declaration without <sys/stat.h>. A static/local lookalike or a
- // C++ (non-extern-"C") declaration keeps a zero builtin id and is ignored.
- if (FD->getBuiltinID() != Builtin::BIumask)
+ // system-header origin.
+ if (FD->getBuiltinID() != Builtin::BIumask || TheCall->getNumArgs() != 1)
----------------
efriedma-quic wrote:
Nothing enforces that mode_t is an integer.
https://github.com/llvm/llvm-project/pull/231696
More information about the cfe-commits
mailing list