This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Rename cp_lookup_symbol_imports to cp_lookup_symbol_via_imports
- From: Doug Evans <xdje42 at gmail dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 16 Dec 2014 22:22:58 -0800
- Subject: Re: [PATCH] Rename cp_lookup_symbol_imports to cp_lookup_symbol_via_imports
- Authentication-results: sourceware.org; auth=none
- References: <m3iohfick1 dot fsf at seba dot sebabeach dot org>
On Sat, Dec 13, 2014 at 11:18 AM, Doug Evans <xdje42@gmail.com> wrote:
> Hi.
>
> Maybe it's just me, but I find cp-namespace.c to be unreadable
> in that I have to keep too much state in my head about what functions
> REALLY do because their names are ambiguous and confusing.
>
> In this case, this rename makes this part 10x easier for me to read.
> I don't have to remember what "lookup symbol imports" REALLY means
> (it doesn't mean anything, it's "lookup symbol VIA imports").
>
> Also, cp_lookup_symbol_imports currently does this:
>
> /* First, try to find the symbol in the given namespace. */
> if (!declaration_only)
> sym = cp_lookup_symbol_in_namespace (scope, name,
> block, domain, 1);
>
> That's not really in keeping with what the function is intended to do,
> but moving that out is a topic for another patch.
>
> 2014-12-13 Doug Evans <xdje42@gmail.com>
>
> * cp-namespace.c (cp_lookup_symbol_via_imports): Renamed from
> cp_lookup_symbol_imports. All callers updated.
Committed.