[cfe-dev] [analyzer] Why use `checkPostCall()` to model the function semantics in `StdLibraryFunctionsChecker.cpp` ?

Henry Wong via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 24 20:46:16 PDT 2018


Hi all,

`StdLibraryFunctionsChecker.cpp` is a very useful and great tool to improve the modeling of library function. But I can't figure out why use `checkPostCall()` to model the function samantic.

What puzzles me is the order of API calls. For example, if we want to make some checks on `getline()` in `CheckerA`, and use `checkPostCall()` to collect information or set `ProgramState`, the `checkPostCall()` of `CheckerA` is likely to be behind the `checkPostCall()` of `StdLibraryFunctionsChecker.cpp`. At this point, `CheckerA` does not use the model information of `getline()` in `StdLibraryFunctionsChecker.cpp`. So what is the original intention of using `checkPostCall()` to play the key role in modeling?

And I want to know what plans community have for `StdLibraryFunctionsChecker.cpp` in the future, for example, extend it to handle more complex library functions?

Thanks in advance!

Henry Wong
Qihoo 360 Codesafe Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180425/e2eea968/attachment.html>


More information about the cfe-dev mailing list