[PATCH] D79430: [analyzer] StdLibraryFunctionsChecker: Add LazyRanges to support type dependent Max

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 01:35:30 PDT 2020


xazax.hun added a comment.

I am a bit unsure what the purpose of these `Max` summaries are? As far as I understand the `Max` represents the largest value for the type of the formal parameter.

Do we really ever need to specify this in a summary? Isn't it always an error to pass a value that is larger than the formal's type can represent?

If the answer is yes, I think we should have a separate checker for catching those overflows. If the answer is no, we might want to express a simpler summary, something like `cannot overflow on argument X`.

What do you think?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79430





More information about the cfe-commits mailing list