[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way
wangxin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 16 06:31:34 PDT 2017
wangxindsb created this revision.
This implement a path-sensitive checker that warns if virtual calls are made from constructors and destructors.
The checker use the GDM (generic data map) to store three integers in the program state for constructors, destructors and objects. Once enter one of these is entered, increase the corresponding integer, once leave, decrease the corresponding integer. In a PreCall callback, the checker first check if a virtual method is called and the GDM meets the conditions, if yes, a warning will be issued.
The checker also include a bug reporter visitor to add an extra note when the last constructor/destructor was called before the call to the virtual function.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 19094 bytes
Desc: not available
More information about the cfe-commits