[cfe-commits] [patch][pr13142] Call the correct method when looking through casts to final classes.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jun 19 20:18:52 PDT 2012


I noticed that the original patch was not handling destructor calls
correctly.  Handling them in CGExprCXX.cpp is simple, but I could not
find a good place is sema to mark them used. The regular functions in
the previous examples are not, but we were asserting only on
destructors.

On 19 June 2012 11:26, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> Clang currently looks through casts to find out if the class it is
> calling a method of is final, but then forgets to look again when
> actually producing the direct call.
>
> The attached patch fixes it, but I had to code a method for finding
> the corresponding method in a derived class. I assume something like
> this already exists somewhere (for building vtables for example), but
> I could not find it.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 6099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120619/e65a57a4/attachment.obj>


More information about the cfe-commits mailing list