Home | History | Annotate | Download | only in Sema

Lines Matching defs:Friend

10436 /// \brief Perform semantic analysis of the given friend type declaration.
10438 /// \returns A friend declaration that.
10442 assert(TSInfo && "NULL TypeSourceInfo for friend type declaration");
10447 // C++03 [class.friend]p2:
10448 // An elaborated-type-specifier shall be used in a friend declaration
10453 // Do not complain about the form of friend template types during
10490 // C++11 [class.friend]p3:
10491 // A friend declaration that does not declare a function shall have one
10493 // friend elaborated-type-specifier ;
10494 // friend simple-type-specifier ;
10495 // friend typename-specifier ;
10500 // If the type specifier in a friend declaration designates a (possibly
10501 // cv-qualified) class type, that class is declared as a friend; otherwise,
10502 // the friend declaration is ignored.
10506 /// Handle a friend tag declaration where the scope specifier was
10524 /*friend*/ true,
10560 // friend. TODO: for source fidelity, remember the headers.
10596 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
10598 Friend->setAccess(AS_public);
10599 CurContext->addDecl(Friend);
10600 return Friend;
10607 // Handle the case of a templated-scope friend class. e.g.
10618 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
10620 Friend->setAccess(AS_public);
10621 Friend->setUnsupportedFriend(true);
10622 CurContext->addDecl(Friend);
10623 return Friend;
10627 /// Handle a friend type declaration. This works in tandem with
10630 /// Notes on friend class templates:
10632 /// We generally treat friend class declarations as if they were
10634 /// in a friend declaration is required to obey the restrictions of a
10640 /// friend class A<T>::B<unsigned>;
10643 /// template <> template \<class T> friend class A<int>::B;
10652 // friend templates because ActOnTag never produces a ClassTemplateDecl
10668 // template <T> friend A<T>::foo;
10669 // where deciding whether a class C is a friend or not now hinges
10672 // (which we declare (by fiat) elaborated friend declarations to
10675 // FIXME: handle "template <> friend class A<T>;", which
10683 // C++98 [class.friend]p1: A friend of a class is a function
10691 // friend one of your own members (it's not, however, worthless to
10692 // friend a member of an arbitrary specialization of your template).
10723 // C++ [class.friend]p1
10724 // A friend of a class is a function or class....
10742 // - If a friend declaration in a non-local class first declares a
10743 // class or function, the friend class or function is a member
10745 // - The name of the friend is not found by simple name lookup
10749 // - If a friend function is called, its name may be found by the
10753 // declared as a friend, scopes outside the innermost enclosing
10783 // If the name in a friend declaration is neither qualified nor
10788 // C++0x [class.friend]p11:
10789 // If a friend declaration appears in a local class and the name
10792 // innermost enclosing non-class scope. For a friend function
10825 // C++ [class.friend]p1: A friend of a class is a function or
10827 // C++11 changes this for both friend types and functions.
10838 // C++ [class.friend]p6:
10839 // A function can be defined in a friend declaration of a class if and
10876 // C++ [class.friend]p1: A friend of a class is a function or
10885 // C++ [class.friend]p6:
10886 // A function can be defined in a friend declaration of a class if and
10905 // C++ [class.friend]p6:
10906 // A function can be defined in a friend declaration of a class if and
10914 assert(isa<CXXRecordDecl>(DC) && "friend declaration not in class?");