// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s
// Attempt to test each rule for forming associated namespaces
// and classes as described in [basic.lookup.argdep]p2.
// fundamental type: no associated namespace and no associated class
// class type:
// associated classes: itself, the class of which it is a member (if any),
// direct and indirect base classes
// associated namespaces: innermost enclosing namespaces of associated classes
// namespace adl_class_type
// class template specialization: as for class type plus
// for non-type template arguments:
// - nothing
// for type template arguments:
// - associated namespaces and classes of the type template arguments
// for template template arguments:
// - namespaces of which template template arguments are member of
// - classes of which member template used as template template arguments
// are member of
// enumeration type:
// associated namespace: innermost enclosing namespace of its declaration.
// associated class: if the enumeration is a class member, the member's class.
// pointer and reference type:
// associated namespaces and classes of the pointee type
// array type:
// associated namespaces and classes of the base type
// function type:
// associated namespaces and classes of the function parameter types
// and the return type.
// pointer to member function:
// associated namespaces and classes of the class, parameter types
// and return type.
// pointer to member:
// associated namespaces and classes of the class and of the member type.
// [...] if the argument is the name or address of a set of overloaded
// functions and/or function templates, its associated classes and namespaces
// are the union of those associated with each of the members of the set,
// i.e., the classes and namespaces associated with its parameter types and
// return type.
//
// Additionally, if the aforementioned set of overloaded functions is named
// with a template-id, its associated classes and namespaces also include
// those of its type template-arguments and its template template-arguments.
//
// CWG 33 for the union rule. CWG 997 for the template-id rule.