Home | History | Annotate | Download | only in AST

Lines Matching defs:Friend

1 //===-- DeclFriend.h - Classes for C++ friend declarations -*- C++ -*------===//
10 // This file defines the section of the AST representing C++ friend
25 /// FriendDecl - Represents the declaration of a friend entity,
31 /// friend int foo(T);
32 /// friend class B;
33 /// friend T; // only in C++0x
34 /// template <typename U> friend class C;
35 /// template <typename U> friend A& operator+=(A&, const U&) { ... }
39 /// The semantic context of a friend decl is its declaring class.
48 // The declaration that's a friend of this class.
49 FriendUnion Friend;
51 // A pointer to the next friend in the sequence.
54 // Location of the 'friend' specifier.
57 /// True if this 'friend' declaration is unsupported. Eventually we
58 /// will support every possible friend declaration, but for now we
63 // (currently unsupported) friend type declarations, such as
64 // template <class T> friend class A<T>::B;
67 friend class CXXRecordDecl::friend_iterator;
68 friend class CXXRecordDecl;
70 FriendDecl(DeclContext *DC, SourceLocation L, FriendUnion Friend,
73 : Decl(Decl::Friend, DC, L),
74 Friend(Friend),
84 : Decl(Decl::Friend, Empty), NextFriend(),
104 /// If this friend declaration names an (untemplated but possibly
107 /// arbitrary friend type declarations.
109 return Friend.dyn_cast<TypeSourceInfo*>();
119 /// If this friend declaration doesn't name a type, return the inner
122 return Friend.dyn_cast<NamedDecl*>();
125 /// Retrieves the location of the 'friend' keyword.
130 /// Retrieves the source range for the friend declaration.
156 /// Determines if this friend kind is unsupported.
166 static bool classofKind(Kind K) { return K == Decl::Friend; }
168 friend class ASTDeclReader;
169 friend class ASTDeclWriter;
170 friend class ASTNodeImporter;
171 friend TrailingObjects;
174 /// An iterator over the friend declarations of a class.
178 friend class CXXRecordDecl;
192 assert(Ptr && "attempt to increment past end of friend list");
238 assert(!FD->NextFriend && "friend already has next friend?");