================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits