Not sure that I've got the idea. Each example is designed for the particular case of a dangerous pointer usage. In order: The first example illustrates the usage of a pointer as an operand of a //delete//-expression - OK. The second example is a modified example from the C++ spec - a call to a virtual function of an object whose lifetime has ended. Did you mean to call a destructor or keep a pointer to a field within the object instead? Isn't a call to a virtual function a usage of an old object? The last three examples illustrate the following cases: - the pointer is implicitly converted to a pointer to a base class type - the pointer is used as the operand of a static_cast (except when the conversion is to void*, or to void* and subsequently to char*, or unsigned char*) - the pointer is used as the operand of a dynamic_cast Do you think the corresponding tests should be modified somehow?
http://reviews.llvm.org/D3457 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
