Skip to content

Commit 81fe4bd

Browse files
Зишан МирзаZishan Mirza
authored andcommitted
fix: static analyzer for ctime_s
1 parent 6785115 commit 81fe4bd

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
@@ -3573,7 +3573,7 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
35733573
/*Buffer=*/ArgNo(1),
35743574
/*MinBufSize=*/BVF.getValue(26, IntTy))));
35753575

3576-
// char *ctime_r(char *buf, rsize_t buf_size, const time_t *timep);
3576+
// char *ctime_s(char *buf, rsize_t buf_size, const time_t *timep);
35773577
addToFunctionSummaryMap(
35783578
"ctime_s",
35793579
Signature(ArgTypes{CharPtrTy,
@@ -3582,10 +3582,10 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
35823582
RetType{CharPtrTy}),
35833583
Summary(NoEvalCall)
35843584
.ArgConstraint(NotNull(ArgNo(0)))
3585-
.ArgConstraint(NotNull(ArgNo(1)))
35863585
.ArgConstraint(BufferSize(
35873586
/*Buffer=*/ArgNo(1),
35883587
/*MinBufSize=*/BVF.getValue(26, IntTy))));
3588+
.ArgConstraint(NotNull(ArgNo(1)))
35893589

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

0 commit comments

Comments
 (0)