[clang] [clang] Warn on umask() argument bits outside 0777 (PR #198130)
Denys Fedoryshchenko via cfe-commits
cfe-commits at lists.llvm.org
Mon May 25 04:36:21 PDT 2026
================
@@ -1490,6 +1490,49 @@ void Sema::checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD,
<< FunctionName << DestinationStr << SourceStr);
}
+void Sema::checkFortifiedLibcArgument(FunctionDecl *FD, CallExpr *TheCall) {
+ if (TheCall->isValueDependent() || TheCall->isTypeDependent() ||
+ isConstantEvaluatedContext())
+ return;
+ if (!FD->isExternC())
----------------
nuclearcat wrote:
I checked, in C the member becomes a FieldDecl (via err_field_declared_as_function), not a record-context FunctionDecl, so it never reaches this check
adding it as a regression test
https://github.com/llvm/llvm-project/pull/198130
More information about the cfe-commits
mailing list