[cfe-dev] virtual method calls in ctor/dtor
Olaf.Krzikalla at tu-dresden.de
Thu Dec 5 06:55:32 PST 2013
before I implement it by myself I'd rather ask. Maybe there is already a
solution or it is not as simple as I thought.
The question is, whether or not it is possible to implement a warning
about direct or indirect calls to virtual methods within ctors or dtors.
My approach would be to generate the cfg of the examined ctor/dtor and
then traverse the execution paths and see if there is such a call. The
interesting/difficult thing could be to keep track of the "this"
pointer, since calls by other objects should not lead to such a warning.
What do you think?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4856 bytes
Desc: S/MIME Cryptographic Signature
More information about the cfe-dev