This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] support argument dependent lookup (ADL)
- From: Tom Tromey <tromey at redhat dot com>
- To: Sami Wagiaalla <swagiaal at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Tue, 30 Mar 2010 14:00:39 -0600
- Subject: Re: [patch] support argument dependent lookup (ADL)
- References: <4BA7D08C.5070702@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:
Sami> 2010-03-22 Sami Wagiaalla <swagiaal@redhat.com>
Sami> PR C++/7943:
This looks pretty good. I have a few nits.
Sami> +static void make_symbol_overload_list_adl_namespace (struct type *type,
Sami> + const char *func_name)
Newline after 'void'.
Sami> + if (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_CODE (type) == TYPE_CODE_REF
Sami> + || TYPE_CODE (type) == TYPE_CODE_ARRAY)
Sami> + return make_symbol_overload_list_adl_namespace (TYPE_TARGET_TYPE (type),
Sami> + func_name);
Rather than a recursive call here, just use a loop to strip off the
outer types.
Also, it is a bit weird to use 'return' like this in a void function.
Sami> + /* Check public base type */
Sami> + if (TYPE_CODE(type) == TYPE_CODE_CLASS)
Space between TYPE_CODE and the open paren.
Sami> +
Sami> +}
Spurious newline at the end of this function.
Sami> + /* If we have reached the deepesst level perform argument
Typo: should be "deepest".
Sami> + if (!searched_deeper)
Sami> + make_symbol_overload_list_adl (arg_types, nargs, func_name);
Something I don't understand is how this code excludes qualified names,
or method names, from ADL lookup.
Tom