[cfe-commits] [Review Request]Polymorphic Pointers Checker
Jim Goodnow II
Jim at HumanityOnline.com
Fri May 20 15:19:45 PDT 2011
This checks for the implicit casting of an array of a derived type to a
base pointer. This is problematic because if the base pointer is
incremented or indexed, a size difference between the base and derived
classes could result in a bad pointer calculation. I could check for the
sizes of the two classes to see if they happen to be the same, but it's
really just a bad practice, since the size could change on a later revision.
- jim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polymorphicpointer.cpp
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110520/10aeb261/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PolymorphicPointer.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110520/10aeb261/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PolymorphicPointerChecker.cpp
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110520/10aeb261/attachment-0002.ksh>
More information about the cfe-commits
mailing list