steakhal accepted this revision.
steakhal added a comment.
This revision is now accepted and ready to land.
Awesome, thank you.
================
Comment at:
clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:1771
+ .Case({ReturnValueCondition(LessThanOrEq, ArgNo(2)),
+ ReturnValueCondition(WithinRange, Range(-1, Ssize_tMax))})
.ArgConstraint(NotNull(ArgNo(0)))
----------------
martong wrote:
> steakhal wrote:
> >
> The two constraints are applied in the same case (branch), the second is more
> generic. The first constraint may not have any effect if Arg2 is Unknown.
> Consequently, [-1, -1] would be too strict in such cases.
I overlooked that we have a single `Case`, my bad.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92474/new/
https://reviews.llvm.org/D92474
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits