From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22472 invoked by alias); 30 Mar 2010 20:00:52 -0000 Received: (qmail 22460 invoked by uid 22791); 30 Mar 2010 20:00:51 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Mar 2010 20:00:46 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2UK0hjf006836 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 30 Mar 2010 16:00:43 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2UK0fwT018129; Tue, 30 Mar 2010 16:00:41 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o2UK0enW031897; Tue, 30 Mar 2010 16:00:40 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 3724788844C; Tue, 30 Mar 2010 14:00:40 -0600 (MDT) From: Tom Tromey To: Sami Wagiaalla Cc: GDB Patches Subject: Re: [patch] support argument dependent lookup (ADL) References: <4BA7D08C.5070702@redhat.com> Reply-To: tromey@redhat.com Date: Tue, 30 Mar 2010 20:00:00 -0000 In-Reply-To: <4BA7D08C.5070702@redhat.com> (Sami Wagiaalla's message of "Mon, 22 Mar 2010 16:18:20 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg01082.txt.bz2 >>>>> "Sami" == Sami Wagiaalla writes: Sami> 2010-03-22 Sami Wagiaalla 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