Skip to content

Commit 18e882e

Browse files
Зишан Мирзаzimirza
authored andcommitted
fix: static analyzer for ctime_s
1 parent b4d5208 commit 18e882e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3574,7 +3574,7 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
35743574
/*Buffer=*/ArgNo(1),
35753575
/*MinBufSize=*/BVF.getValue(26, IntTy))));
35763576

3577-
// char *ctime_r(char *buf, rsize_t buf_size, const time_t *timep);
3577+
// char *ctime_s(char *buf, rsize_t buf_size, const time_t *timep);
35783578
addToFunctionSummaryMap(
35793579
"ctime_s",
35803580
Signature(ArgTypes{CharPtrTy,
@@ -3583,10 +3583,10 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
35833583
RetType{CharPtrTy}),
35843584
Summary(NoEvalCall)
35853585
.ArgConstraint(NotNull(ArgNo(0)))
3586-
.ArgConstraint(NotNull(ArgNo(1)))
35873586
.ArgConstraint(BufferSize(
35883587
/*Buffer=*/ArgNo(1),
35893588
/*MinBufSize=*/BVF.getValue(26, IntTy))));
3589+
.ArgConstraint(NotNull(ArgNo(1)))
35903590

35913591
// struct tm *gmtime_r(const time_t *restrict timer,
35923592
// struct tm *restrict result);

0 commit comments

Comments
 (0)