[cfe-dev] Adding a CFG node for the allocation call in a new-expression
jediknil at belkadan.com
Wed Apr 4 10:06:22 PDT 2012
Hi, Ted (and list). After the negative feedback on representing new-expression allocations using CXXOperatorCallExpr, I went back to the original idea of adding a CFG node. Without properly modelling constructors this doesn't gain us very much right now, but it does set the stage for eventually being able to get all of the behavior of a new-expression into the analyzer.
- What does it mean to be PreStmt<CXXNewExpr> if the allocation and the initializer have already happened? (Note that right neither PreStmt nor PostStmt checks are done on CXXNewExpr, but that's easily fixed.)
- How can we represent "calls" that don't have associated expressions? I'm starting to think CallOrObjCMessage needs to turn into a real "abstract call" model which may or may not have expressions for the arguments and can handle regular calls, messages, constructors, destructors, allocations, and deletions. New checks: preCall and postCall. But that's a bit outside the scope of this patch.
Anyway, how does this part look?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 26232 bytes
Desc: not available
More information about the cfe-dev