Home | History | Annotate | Download | only in Sema

Lines Matching defs:Friend

9880 /// \brief Perform semantic analysis of the given friend type declaration.
9882 /// \returns A friend declaration that.
9886 assert(TSInfo && "NULL TypeSourceInfo for friend type declaration");
9891 // C++03 [class.friend]p2:
9892 // An elaborated-type-specifier shall be used in a friend declaration
9897 // Do not complain about the form of friend template types during
9933 // C++0x [class.friend]p3:
9934 // If the type specifier in a friend declaration designates a (possibly
9935 // cv-qualified) class type, that class is declared as a friend; otherwise,
9936 // the friend declaration is ignored.
9938 // FIXME: C++0x has some syntactic restrictions on friend type declarations
9939 // in [class.friend]p3 that we do not implement.
9944 /// Handle a friend tag declaration where the scope specifier was
9961 /*friend*/ true,
9997 // friend. TODO: for source fidelity, remember the headers.
10032 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
10034 Friend->setAccess(AS_public);
10035 CurContext->addDecl(Friend);
10036 return Friend;
10043 // Handle the case of a templated-scope friend class. e.g.
10054 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
10056 Friend->setAccess(AS_public);
10057 Friend->setUnsupportedFriend(true);
10058 CurContext->addDecl(Friend);
10059 return Friend;
10063 /// Handle a friend type declaration. This works in tandem with
10066 /// Notes on friend class templates:
10068 /// We generally treat friend class declarations as if they were
10070 /// in a friend declaration is required to obey the restrictions of a
10076 /// friend class A<T>::B<unsigned>;
10079 /// template <> template <class T> friend class A<int>::B;
10088 // friend templates because ActOnTag never produces a ClassTemplateDecl
10104 // template <T> friend A<T>::foo;
10105 // where deciding whether a class C is a friend or not now hinges
10108 // (which we declare (by fiat) elaborated friend declarations to
10111 // FIXME: handle "template <> friend class A<T>;", which
10119 // C++98 [class.friend]p1: A friend of a class is a function
10127 // friend one of your own members (it's not, however, worthless to
10128 // friend a member of an arbitrary specialization of your template).
10159 // C++ [class.friend]p1
10160 // A friend of a class is a function or class....
10178 // - If a friend declaration in a non-local class first declares a
10179 // class or function, the friend class or function is a member
10181 // - The name of the friend is not found by simple name lookup
10185 // - If a friend function is called, its name may be found by the
10189 // declared as a friend, scopes outside the innermost enclosing
10219 // If the name in a friend declaration is neither qualified nor
10224 // C++0x [class.friend]p11:
10225 // If a friend declaration appears in a local class and the name
10228 // innermost enclosing non-class scope. For a friend function
10261 // C++ [class.friend]p1: A friend of a class is a function or
10263 // C++11 changes this for both friend types and functions.
10274 // C++ [class.friend]p6:
10275 // A function can be defined in a friend declaration of a class if and
10312 // C++ [class.friend]p1: A friend of a class is a function or
10321 // C++ [class.friend]p6:
10322 // A function can be defined in a friend declaration of a class if and
10341 // C++ [class.friend]p6:
10342 // A function can be defined in a friend declaration of a class if and
10350 assert(isa<CXXRecordDecl>(DC) && "friend declaration not in class?");