Lines Matching defs:Friend
8185 /// \brief Perform semantic analysis of the given friend type declaration.
8187 /// \returns A friend declaration that.
8190 assert(TSInfo && "NULL TypeSourceInfo for friend type declaration");
8196 // C++03 [class.friend]p2:
8197 // An elaborated-type-specifier shall be used in a friend declaration
8202 // Do not complain about the form of friend template types during
8230 // C++0x [class.friend]p3:
8231 // If the type specifier in a friend declaration designates a (possibly
8232 // cv-qualified) class type, that class is declared as a friend; otherwise,
8233 // the friend declaration is ignored.
8235 // FIXME: C++0x has some syntactic restrictions on friend type declarations
8236 // in [class.friend]p3 that we do not implement.
8241 /// Handle a friend tag declaration where the scope specifier was
8258 /*friend*/ true,
8295 // friend. TODO: for source fidelity, remember the headers.
8318 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
8320 Friend->setAccess(AS_public);
8321 CurContext->addDecl(Friend);
8322 return Friend;
8325 // Handle the case of a templated-scope friend class. e.g.
8336 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
8338 Friend->setAccess(AS_public);
8339 Friend->setUnsupportedFriend(true);
8340 CurContext->addDecl(Friend);
8341 return Friend;
8345 /// Handle a friend type declaration. This works in tandem with
8348 /// Notes on friend class templates:
8350 /// We generally treat friend class declarations as if they were
8352 /// in a friend declaration is required to obey the restrictions of a
8358 /// friend class A<T>::B<unsigned>;
8361 /// template <> template <class T> friend class A<int>::B;
8370 // friend templates because ActOnTag never produces a ClassTemplateDecl
8386 // template <T> friend A<T>::foo;
8387 // where deciding whether a class C is a friend or not now hinges
8390 // (which we declare (by fiat) elaborated friend declarations to
8393 // FIXME: handle "template <> friend class A<T>;", which
8401 // C++98 [class.friend]p1: A friend of a class is a function
8409 // friend one of your own members (it's not, however, worthless to
8410 // friend a member of an arbitrary specialization of your template).
8442 // C++ [class.friend]p1
8443 // A friend of a class is a function or class....
8461 // - If a friend declaration in a non-local class first declares a
8462 // class or function, the friend class or function is a member
8464 // - The name of the friend is not found by simple name lookup
8468 // - If a friend function is called, its name may be found by the
8472 // declared as a friend, scopes outside the innermost enclosing
8502 // If the name in a friend declaration is neither qualified nor
8507 // C++0x [class.friend]p11:
8508 // If a friend declaration appears in a local class and the name
8511 // innermost enclosing non-class scope. For a friend function
8544 // C++ [class.friend]p1: A friend of a class is a function or
8546 // C++0x changes this for both friend types and functions.
8584 // C++ [class.friend]p1: A friend of a class is a function or
8596 assert(isa<CXXRecordDecl>(DC) && "friend declaration not in class?");