diff options
author | Andrés Villegas <andresvi@google.com> | 2024-01-03 23:05:15 +0000 |
---|---|---|
committer | Andrés Villegas <andresvi@google.com> | 2024-01-03 23:05:15 +0000 |
commit | 51113244836be55b3d2f181c0f88043b5967eb61 (patch) | |
tree | 4a2308a430f7eafe9470e53066342961a30aba54 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
parent | f7907be4efb9768449294d0c47cd7f7beaa850ea (diff) | |
download | llvm-51113244836be55b3d2f181c0f88043b5967eb61.zip llvm-51113244836be55b3d2f181c0f88043b5967eb61.tar.gz llvm-51113244836be55b3d2f181c0f88043b5967eb61.tar.bz2 |
[𝘀𝗽𝗿] changes introduced through rebaseusers/avillega/main.clangd-migrate-command-line-option-parsin-to-opttable
Created using spr 1.3.5
[skip ci]
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp index 6560fd2..2006865 100644 --- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp @@ -2507,10 +2507,13 @@ 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({ReturnValueCondition(BO_EQ, ArgNo(0))}, + ErrnoMustNotBeChecked, GenericSuccessMsg) + .Case({IsNull(Ret)}, ErrnoNEZeroIrrelevant, GenericFailureMsg) + .ArgConstraint(NotNull(ArgNo(0)))); // char *getcwd(char *buf, size_t size); // FIXME: Improve for errno modeling. |