[PATCH] D27091: Add the way to extract SVals of arguments used in a call for a given StackFrameCtx

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 1 22:32:32 PST 2016


NoQ added a comment.

Chatted about this a bit more. Because `CallEvent` is an API designed mostly for convenience, and `ProgramState` is a core API that needs to stay as clean and separate from other entities and easy to understand as possible, it would be the best to

1. construct a `CallEvent` in the checker (which is cheap) and query that,
2. and also allow constructing `CallEvent`s for the top frame (with `StackFrameContext::inTopFrame()`, with null call site ("origin") expression), and
3. add a branch to the `CallEvent::getArgSVal()` method (and similar methods for obtaining implicit arguments like C++ `this`, ObjC `self`, ObjC `super`) to handle the top frame case.

If this sounds hard, handling this completely on the checker side is fine, because few checker are using this at the moment.


https://reviews.llvm.org/D27091





More information about the cfe-commits mailing list