[cfe-dev] Replacing the analyzer's CallOrObjCMessage with something more general

Tom Care tom.care at uqconnect.edu.au
Thu Jun 28 15:55:35 PDT 2012


Looks great, this makes my C++ constructor inlining significantly less hacky. I'll have to integrate and see how it works with my branch, but I'm hoping to be able clean it up enough to contribute new/delete handling very soon, including MallocChecker support.

Tom

On 27/06/2012, at 10:41 AM, Jordan Rose wrote:

> (copying to list with compressed patches, because the series of patches resulted in a 400kb message)
> 
> All right, I think this ready to be merged into trunk!
> 
> Since there's really way too much here, I'll try to condense the important things:
> - CallEvent is a wrapper around some part of the source that triggers a call to something (function, constructor, method, etc.)
> - CallEvent is path-sensitive; it captures the state and location context where the call happens.
> - CallEvent and its subclasses replace CallOrObjCMessage everywhere possible.
> - CallEvent subclass ObjCMethodCall and its subclasses replace ObjCMessage everywhere possible.
> - Inlining for C++ constructors is now totally feasible, but still disabled because we don't track destructors yet.
> - New checker callbacks check::preCall and check::postCall should be called any time ExprEngine processes something that could call outside code.
> - Calls.h attached for your convenience; everything else is in the ten patch files. (Sorry! If you'd prefer per-patch review or something, we can do that too.)
> 
> % git log1
> 5ed29a5 [analyzer] Convert existing checkers to use check::preCall and check::postCall.
> a1940c6 [analyzer] Add generic preCall and postCall checks.
> ef97dfa [analyzer] Convert CXXConstructExpr over to use CallEvent for evaluation.
> ebf2c52 [analyzer] Use CallEvent for inlining and call default-evaluation.
> 94dde7d [analyzer] Finish replacing ObjCMessage with ObjCMethodDecl and friends.
> 7afaef7 [analyzer] Begin replacing ObjCMessage with ObjCMethodCall and friends.
> ba3cb76 [analyzer] Move the last bits of CallOrObjCMessage over to CallEvent.
> 321bb87 [analyzer] Convert CallAndMessageChecker and ObjCSelfInitChecker to CallEvent.
> 30502d6 [analyzer] Convert RetainCountChecker to use CallEvent as much as possible.
> bc61f9d [analyzer] Add a new abstraction over all types of calls: CallEvent
> 
> <Calls.h><Patches.zip>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120629/98a1d704/attachment.html>


More information about the cfe-dev mailing list