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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Jun 25 11:38:17 PDT 2012


> This is doing a lot of excess work, because you're walking the overrides of completely unrelated methods. At the very least, you should lookup() on the name of the method and only walk those. A 'perfect' solution would use the rules that govern the signatures of overridden functions (e.g., by checking parameter types and cv/ref-qualifiers) to avoid looking at functions that clearly can't override 'this'.

The attached patch uses lookup, but I had to change how we handle
destructors since the base class destructor doesn't show up in the
lookup of the current method name. Let me know if it is OK.

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


More information about the cfe-commits mailing list