Lines Matching refs:lookup
1 /* Definitions for C++ name lookup routines.
66 /* Mark this as a lookup, so we can tell this is a stat hack. */
173 name_lookup *previous; /* Previously active lookup. */
176 /* Marked scope stack for outermost name lookup. */
178 /* Currently active lookup. */
239 qualified lookup rules. */
267 /* Search namespace + inlines + maybe usings as qualified lookup. */
270 /* Search namespace + inlines + usings as unqualified lookup. */
273 /* ADL lookup of ARGS. */
278 allocating and freeing on every single lookup. */
281 /* Currently active lookup. */
284 /* Name lookup is recursive, becase ADL can cause template
286 it not happening. When we discover an active name-lookup, which
287 must be an ADL lookup, we need to unmark the marked scopes and also
288 unmark the lookup we might have been accumulating. */
305 /* Preserve the FOUND_P state on the interrupted lookup's
314 /* Unmark the outer partial lookup. */
323 /* Restore the marking state of a lookup we interrupted. */
331 /* Unmark and empty this lookup's scope stack. */
368 /* Remark the outer partial lookup. */
530 /* Merge into the lookup */
606 /* Qualified namespace lookup in SCOPE.
670 /* Unqualified namespace lookup in SCOPE.
725 [basic.lookup.unqual]/7 */
754 /* Add functions of a namespace to the lookup structure. */
786 /* Adds the class and its friends to the lookup structure. */
826 /* Template specializations are never found by name lookup.
836 /* Adds the class and its bases to the lookup structure.
855 /* Adds everything associated with a class argument type to the lookup
1005 /* Adds everything associated with a template argument to the lookup
1011 /* [basic.lookup.koenig]
1051 /* Perform ADL lookup. FNS is the existing lookup result and ARGS are
1088 /* ADL lookup of NAME. FNS is the result of regular lookup, and we
1096 name_lookup lookup (name);
1097 fns = lookup.search_adl (fns, args);
1226 tree lookup = conv_op ? conv_op_identifier : name;
1232 val = member_vec_binary_search (member_vec, lookup);
1243 val = member_vec_linear_search (member_vec, lookup);
1248 if (tree field_val = fields_linear_search (klass, lookup, want_type))
2914 /* An ambiguous lookup. */
2957 namespace lookup. */
2959 /* Avoid repeating a lookup. */
3113 /* Hide it from ordinary lookup. */
3896 is the result of qualified lookup (both value & type are
3903 do_nonmember_using_decl (name_lookup &lookup, bool fn_scope_p,
3918 if (lookup.value && DECL_IMPLICIT_TYPEDEF_P (lookup.value))
3920 lookup.type = lookup.value;
3921 lookup.value = NULL_TREE;
3924 if (!lookup.value)
3926 else if (OVL_P (lookup.value) && (!value || OVL_P (value)))
3928 for (lkp_iterator usings (lookup.value); usings; ++usings)
3981 && (fn_scope_p || !decls_match (lookup.value, value)))
3983 diagnose_name_conflict (lookup.value, value);
3987 value = lookup.value;
3989 if (lookup.type && lookup.type != type)
3991 if (type && !decls_match (lookup.type, type))
3993 diagnose_name_conflict (lookup.type, type);
3997 type = lookup.type;
4074 lookup. T can be arbitrary scope, not necessary nested inside the
4156 nested inside current scope. This works with both name lookup and
4159 name lookup rule in 14.6.1/6.
4267 bound. CLASS_TYPE is the class in which the lookup occurred. */
4612 /* Process and lookup a using decl SCOPE::lookup.name, filling in
4613 lookup.values & lookup.type. Return true if ok. */
4616 lookup_using_decl (tree scope, name_lookup &lookup)
4630 qualified_namespace_lookup (scope, &lookup);
4635 scope, lookup.name);
4648 if (TREE_CODE (lookup.name) == BIT_NOT_EXPR)
4650 error ("%<%T::%D%> names destructor", scope, lookup.name);
4656 && (lookup.name == TYPE_IDENTIFIER (scope)
4657 || constructor_name_p (lookup.name, scope)))
4660 lookup.name = ctor_identifier;
4665 if (constructor_name_p (lookup.name, current))
4668 scope, lookup.name, current);
4703 else if (lookup.name == ctor_identifier && !binfo_direct_p (binfo))
4709 else if (IDENTIFIER_CONV_OP_P (lookup.name)
4710 && dependent_type_p (TREE_TYPE (lookup.name)))
4713 lookup.value = lookup_member (binfo, lookup.name, 0,
4720 if (!lookup.value)
4722 error ("%qD has not been declared in %qE", lookup.name, scope);
4726 if (TREE_CODE (lookup.value) == TREE_LIST
4728 || (lookup.type && TREE_CODE (lookup.type) == TREE_LIST))
4730 error ("reference to %qD is ambiguous", lookup.name);
4731 print_candidates (TREE_CODE (lookup.value) == TREE_LIST
4732 ? lookup.value : lookup.type);
4736 if (TREE_CODE (lookup.value) == NAMESPACE_DECL)
4738 error ("using-declaration may not name namespace %qD", lookup.value);
4756 name_lookup lookup (name, 0);
4757 if (!lookup_using_decl (scope, lookup))
4760 tree found = lookup.value;
4765 tree using_decl = build_lang_decl (USING_DECL, lookup.name, NULL_TREE);
4830 name_lookup lookup (DECL_NAME (decl), LOOKUP_HIDDEN);
4831 if (!lookup.search_qualified (scope, /*usings=*/false))
4834 old = lookup.value;
4837 /* If it's a TREE_LIST, the result of the lookup was ambiguous. */
5142 name_lookup lookup (name, 0);
5144 if (!lookup_using_decl (scope, lookup))
5149 cp_emit_debug_info_for_using (lookup.value,
5159 do_nonmember_using_decl (lookup, false, &value, &type);
5173 tree using_decl = build_lang_decl (USING_DECL, lookup.name, NULL_TREE);
5189 do_nonmember_using_decl (lookup, true, &value, &type);
5238 /* Given a lookup that returned VAL, use FLAGS to decide if we want to
5431 name_lookup lookup (name);
5433 if (lookup.search_qualified (ns, false))
5434 m_candidates.safe_push (lookup.value);
5474 for m_name, an IDENTIFIER_NODE for which name lookup failed.
5549 name lookup failed.
5602 name lookup failed.
5955 lookup failed within the explicitly provided SCOPE.
6027 name_lookup lookup (name, flags);
6029 if (qualified_namespace_lookup (scope, &lookup))
6030 t = lookup.value;
6049 Accepts the NAME to lookup and its qualifying SCOPE.
6054 qualified_namespace_lookup (tree scope, name_lookup *lookup)
6057 query_oracle (lookup->name);
6058 bool found = lookup->search_qualified (ORIGINAL_NAMESPACE (scope));
6376 declared, we must lookup NAME in those class scopes. */
6450 unqualified name lookup will not find template conversion
6531 (but not nested within "A") -- but that name lookup
6549 lookup until a matching declaration is provided in the
6562 /* Now lookup in namespace scopes. */
6565 name_lookup lookup (name, flags);
6566 if (lookup.search_unqualified
6568 val = lookup.value;
6901 ordinary name lookup. Its corresponding TEMPLATE_DECL
7389 name_lookup lookup (name, 0);
7390 if (!lookup.search_qualified (current_namespace, /*usings=*/false))
7392 else if (TREE_CODE (lookup.value) == TREE_LIST)
7394 /* An ambiguous lookup. If exactly one is a namespace, we
7402 for (tree *chain = &lookup.value, next; (next = *chain);)
7420 if (TREE_CHAIN (lookup.value))
7423 print_candidates (lookup.value);
7426 else if (TREE_CODE (lookup.value) == NAMESPACE_DECL)
7427 ns = lookup.value;
7620 /* Return the result of unqualified lookup for the overloaded operator
7685 normal unqualified lookup will find them again. */
7725 #include "gt-cp-name-lookup.h"