[PATCH] D92474: [analyzer][StdLibraryFunctionsChecker] Add return value constraint to functions with BufferSize

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 2 06:48:17 PST 2020


martong marked 2 inline comments as done.
martong added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:2076
         Summary(NoEvalCall)
+            .Case({ReturnValueCondition(WithinRange, Range(-1, 0))})
             .ArgConstraint(NotNull(ArgNo(3)))
----------------
steakhal wrote:
> BTW, this is quite frequently repeated.
> Do you think worth hoisting such a return value constraint?
> 
> I'm thinking of something like `ReturnsZeroOrMinusOne`.
Good idea!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92474/new/

https://reviews.llvm.org/D92474



More information about the cfe-commits mailing list