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

Douglas Gregor dgregor at apple.com
Tue Jun 26 10:39:39 PDT 2012


On Jun 25, 2012, at 11:38 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

>> 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.

LGTM, thanks!

	- Doug



More information about the cfe-commits mailing list