+ /* NOTE: carlton/2003-11-10: We don't treat C++ class members
+ of classes like, say, data or function members. Instead,
+ they're just represented by symbols whose names are
+ qualified by the name of the surrounding class. This is
+ just like members of namespaces; in particular,
+ cp_basic_lookup_symbol works when looking them up. */
+
+ if (basic_lookup)
+ {
+ sym = cp_basic_lookup_symbol (concatenated_name, block, domain,
+ is_in_anonymous);
+ if (sym.symbol != NULL)
+ return sym;
+ }
+
+ /* Now search all static file-level symbols. We have to do this for things
+ like typedefs in the class. We do not try to guess any imported
+ namespace as even the fully specified namespace search is already not
+ C++ compliant and more assumptions could make it too magic. */
+
+ /* First search in this symtab, what we want is possibly there. */
+ sym = lookup_symbol_in_static_block (concatenated_name, block, domain);
+ if (sym.symbol != NULL)
+ return sym;
+
+ /* Nope. We now have to search all static blocks in all objfiles,
+ even if block != NULL, because there's no guarantees as to which
+ symtab the symbol we want is in. Except for symbols defined in
+ anonymous namespaces should be treated as local to a single file,
+ which we just searched. */
+ if (!is_in_anonymous)
+ {
+ sym = lookup_static_symbol (concatenated_name, domain);
+ if (sym.symbol != NULL)
+ return sym;
+ }
+
+ /* If this is a class with baseclasses, search them next. */
+ container_type = check_typedef (container_type);
+ if (TYPE_N_BASECLASSES (container_type) > 0)
+ {
+ sym = find_symbol_in_baseclass (container_type, nested_name, block,
+ domain, is_in_anonymous);
+ if (sym.symbol != NULL)
+ return sym;
+ }
+
+ return null_block_symbol;
+}
+
+/* Look up a symbol named NESTED_NAME that is nested inside the C++
+ class or namespace given by PARENT_TYPE, from within the context
+ given by BLOCK, and in DOMAIN.
+ Return NULL if there is no such nested symbol. */
+
+struct block_symbol
+cp_lookup_nested_symbol (struct type *parent_type,
+ const char *nested_name,
+ const struct block *block,
+ const domain_enum domain)