[PATCH] [patch] Adding Consumed Analysis to Clang
chriswailes at google.com
Mon Jul 29 18:20:24 PDT 2013
This patch adds the beginnings of an analysis that tracks the "consumed" state of objects (this was previously mentioned on the list as uniqueness analysis).
The analysis currently provides enough functionality to detect when a class like std::unique_ptr is dereferenced after it is created with a default constructor. It can also track the state of an object across the branches of an if-statement if the statement contains a single test of a tracked variable. Lastly, the state of a value that is passed as a RValue References to a function is correctly tracked.
Future work, to follow in the next couple of weeks, will include more precise handling of for- and while-loops, support for member functions that consume an object, and tracking of state across function boundaries.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 40775 bytes
Desc: not available
More information about the cfe-commits