On 08/13/2012 04:49 PM, Fabien ChĂȘne wrote:
+             /* Optimize away vtable lookup if we know that this
+                function can't be overridden.  We need to check if
+                the context and the instance type are the same,
+                actually FN migth be defined in a different class

Typo: "might"

+                type because of a using-declaration. In this case, we
+                do not want to perform a non-virtual call.  */
              if (DECL_VINDEX (fn) && ! (flags & LOOKUP_NONVIRTUAL)
+                 && same_type_p (DECL_CONTEXT (fn), TREE_TYPE (instance))
                  && resolves_to_fixed_type_p (instance, 0))

This should be same_type_ignoring_top_level_qualifiers_p.

OK with that change.

Jason

Reply via email to