[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 17 01:31:57 PDT 2022


martong added a comment.

In D125400#3516164 <https://reviews.llvm.org/D125400#3516164>, @balazske wrote:

> @martong Do you mean that a "describe" function is needed for the return value constraint of the function and for the errno constraint type? Then a note tag can contain what the function is assumed to return on success and what is allowed (or not) to do with `errno`. For example: "Assuming that 'mkdir' is successful, it returns zero in this case and value of 'errno' is unspecified after the call".

Yes, that sounds good. We have the virtual `describe` function in the base constraint class that could be used to explain what values we expect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125400



More information about the cfe-commits mailing list