The checker now recognizes 'freopen' as file opening function.
Added support for binding the return value to the passed stream.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 38039 Build 38038: arc lint + arc unit
Event Timeline
Comment Actions
SimpleStreamChecker is a historical tutorial example, i don't think we should be updating it other than for modernizing checker API use. It was supposed to handle a few simple examples correctly but it wasn't supposed to support all sorts of different APIs.
I'd recommend improving StreamChecker instead if you're interested in having a production-quality checker for everyday use.
Comment Actions
Code of StreamChecker does not look much better, it uses deprecated eval::Call and does not check for escape. But it handles more functions and error at open (still not freopen). A mixture of both would be a better option.
Comment Actions
Btw, evalCall is not deprecated. In fact, there are no alternatives for it in many cases.