diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp @@ -1672,7 +1672,7 @@ addToFunctionSummaryMap("close", Signature(ArgTypes{IntTy}, RetType{IntTy}), Summary(NoEvalCall) .ArgConstraint(ArgumentCondition( - 0, WithinRange, Range(0, IntMax)))); + 0, WithinRange, Range(-1, IntMax)))); // long fpathconf(int fildes, int name); addToFunctionSummaryMap("fpathconf", @@ -1746,7 +1746,7 @@ Summary(NoEvalCall) .ArgConstraint(ArgumentCondition(1, WithinRange, Range(1, SizeMax))) .ArgConstraint( - ArgumentCondition(4, WithinRange, Range(0, IntMax)))); + ArgumentCondition(4, WithinRange, Range(-1, IntMax)))); // int pipe(int fildes[2]); addToFunctionSummaryMap(