Skip to content

Commit 298fa84

Browse files
author
Зишан Мирза
committed
format code with clang-format
1 parent 6fb5f49 commit 298fa84

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3534,13 +3534,12 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
35343534

35353535
// struct tm *localtime_r(const time_t *timer,
35363536
// struct tm *result);
3537-
addToFunctionSummaryMap(
3538-
"localtime_r",
3539-
Signature(ArgTypes{ConstTime_tPtrTy, StructTmPtrTy},
3540-
RetType{StructTmPtrTy}),
3541-
Summary(NoEvalCall)
3542-
.ArgConstraint(NotNull(ArgNo(0)))
3543-
.ArgConstraint(NotNull(ArgNo(1))));
3537+
addToFunctionSummaryMap("localtime_r",
3538+
Signature(ArgTypes{ConstTime_tPtrTy, StructTmPtrTy},
3539+
RetType{StructTmPtrTy}),
3540+
Summary(NoEvalCall)
3541+
.ArgConstraint(NotNull(ArgNo(0)))
3542+
.ArgConstraint(NotNull(ArgNo(1))));
35443543

35453544
// struct tm *localtime_s(const time_t *restrict timer,
35463545
// struct tm *restrict result);
@@ -3577,7 +3576,10 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
35773576
// char *ctime_r(char *buf, rsize_t buf_size, const time_t *timep);
35783577
addToFunctionSummaryMap(
35793578
"ctime_s",
3580-
Signature(ArgTypes{CharPtrTy, BufferSize(ArgNo(1), BVF.getValue(26, IntTy)), ConstTime_tPtrTy}, RetType{CharPtrTy}),
3579+
Signature(ArgTypes{CharPtrTy,
3580+
BufferSize(ArgNo(1), BVF.getValue(26, IntTy)),
3581+
ConstTime_tPtrTy},
3582+
RetType{CharPtrTy}),
35813583
Summary(NoEvalCall)
35823584
.ArgConstraint(NotNull(ArgNo(0)))
35833585
.ArgConstraint(NotNull(ArgNo(1)))

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,8 @@ INTERCEPTOR(char *, ctime_r, unsigned long *timep, char *result) {
14311431
}
14321432
return res;
14331433
}
1434-
INTERCEPTOR(char *, ctime_s, char* result, size_t result_size, unsigned long *timep) {
1434+
INTERCEPTOR(char *, ctime_s, char *result, size_t result_size,
1435+
unsigned long *timep) {
14351436
void *ctx;
14361437
COMMON_INTERCEPTOR_ENTER(ctx, ctime_s, result, result_size, timep);
14371438
// FIXME: under ASan the call below may write to freed memory and corrupt

0 commit comments

Comments
 (0)