[PATCH] Rename cp_lookup_symbol_imports to cp_lookup_symbol_via_imports

Doug Evans xdje42@gmail.com
Wed Dec 17 06:23:00 GMT 2014


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.



More information about the Gdb-patches mailing list