[clang] [clang][analyzer] Improve 'errno' modeling of 'mkdtemp' (PR #76671)
Ben Shi via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 3 01:14:19 PST 2024
================
@@ -2511,10 +2511,12 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
.ArgConstraint(NotNull(ArgNo(0))));
// char *mkdtemp(char *template);
- // FIXME: Improve for errno modeling.
addToFunctionSummaryMap(
"mkdtemp", Signature(ArgTypes{CharPtrTy}, RetType{CharPtrTy}),
- Summary(NoEvalCall).ArgConstraint(NotNull(ArgNo(0))));
+ Summary(NoEvalCall)
+ .Case({NotNull(Ret)}, ErrnoMustNotBeChecked, GenericSuccessMsg)
----------------
benshi001 wrote:
Fixed. Thanks.
https://github.com/llvm/llvm-project/pull/76671
More information about the cfe-commits
mailing list