================
@@ -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())
----------------
AaronBallman wrote:
A test case to consider is this code in C:
```
struct S {
mode_t umask(mode_t);
};
```
because of this assert:
https://github.com/llvm/llvm-project/blob/0c315580e51c2eb901f57f04bf3a9a3aebf0906c/clang/lib/AST/Decl.cpp#L2213
(We'd expect a diagnostic but hopefully we don't then come on to hit this code
path and trigger the assert during error recovery.)
https://github.com/llvm/llvm-project/pull/198130
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits