Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [patch] support argument dependent lookup (ADL)
Date: Tue, 30 Mar 2010 20:00:00 -0000	[thread overview]
Message-ID: <m3vdcdvau0.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4BA7D08C.5070702@redhat.com> (Sami Wagiaalla's message of "Mon, 	22 Mar 2010 16:18:20 -0400")

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


  reply	other threads:[~2010-03-30 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 20:20 Sami Wagiaalla
2010-03-30 20:00 ` Tom Tromey [this message]
2010-04-09 16:11   ` Sami Wagiaalla
2010-04-23 22:34     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3vdcdvau0.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=swagiaal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox