// RUN: %clang_cc1 -fsyntax-only -verify %s
// C++98 [class.friend]p7:
// C++11 [class.friend]p9:
// A name nominated by a friend declaration shall be accessible in
// the scope of the class containing the friend declaration.
// PR12328
// Simple, non-templated case.
// Templated but non-dependent.
// Dependent but instantiated at the right type.
// Dependent and instantiated at the wrong type.
// Dependent because dependently-scoped.
// Dependently-scoped, no friends.
// Dependently-scoped, wrong friend.
// Dependently-scoped, right friend.