Skip to content
Snippets Groups Projects
Commit e38cd64a authored by Nathan Sidwell's avatar Nathan Sidwell
Browse files

c++: ADL refactor

This refactors the ADL lookup.  It just so happens the refactoring
makes dropping modules in simpler :) We break apart the namespace and
class fn processing, and move scope iteration to an outer function.
It'll also become possible to find the same enum in multiple place, so
we need to handle that idempotently.

	gcc/cp/
	* cp-tree.h (LOOKUP_FOUND_P): Add ENUMERAL_TYPE.
	* name-lookup.c (class name_lookup): Add comments.
	(name_lookup::adl_namespace_only): Replace with ...
	(name_lookup::adl_class_fns): ... this and ...
	(name_lookup::adl_namespace_fns): ... this.
	(name_lookup::adl_namespace): Deal with inline nests here.
	(name_lookup::adl_class): Complete the type here.
	(name_lookup::adl_type): Call broken-out enum ..
	(name_lookup::adl_enum): New.  No need to call the namespace adl
	if it is class-scope.
	(name_lookup::search_adl): Iterate over collected scopes here.
parent 4081596e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment