* cp-namespace.c (cp_lookup_symbol_imports): Support ALIAS for the
	CURRENT->DECLARATION case.
	* cp-support.h (struct using_direct): Provide extended comment.
This commit is contained in:
Jan Kratochvil 2010-05-03 20:10:22 +00:00
parent 7c54a10880
commit 1ac77ea163
3 changed files with 51 additions and 18 deletions

View file

@ -355,12 +355,14 @@ cp_lookup_symbol_imports (const char *scope,
searched_cleanup = make_cleanup (reset_directive_searched, current);
/* If there is an import of a single declaration, compare the imported
declaration with the sought out name. If there is a match pass
current->import_src as NAMESPACE to direct the search towards the
imported namespace. */
if (current->declaration && strcmp (name, current->declaration) == 0)
declaration (after optional renaming by its alias) with the sought
out name. If there is a match pass current->import_src as NAMESPACE
to direct the search towards the imported namespace. */
if (current->declaration
&& strcmp (name, current->alias ? current->alias
: current->declaration) == 0)
sym = cp_lookup_symbol_in_namespace (current->import_src,
name,
current->declaration,
block,
domain);