Home | History | Annotate | Download | only in Sema

Lines Matching defs:Friend

103       // extern or friend which happens to be the canonical
190 friend struct AccessTarget;
327 DeclContext *Friend) {
328 if (Friend == Context)
331 assert(!Friend->isDependentContext() &&
337 if (Friend->isFileContext())
345 // in 'friend'.
346 static bool MightInstantiateTo(Sema &S, CanQualType Context, CanQualType Friend) {
347 if (Friend == Context)
350 if (!Friend->isDependentType() && !Context->isDependentType())
359 FunctionDecl *Friend) {
360 if (Context->getDeclName() != Friend->getDeclName())
365 Friend->getDeclContext()))
369 = S.Context.getCanonicalType(Friend->getType())
399 FunctionTemplateDecl *Friend) {
402 Friend->getTemplatedDecl());
407 const CXXRecordDecl *Friend) {
408 if (EC.includesClass(Friend))
413 = S.Context.getCanonicalType(S.Context.getTypeDeclType(Friend));
429 CanQualType Friend) {
430 if (const RecordType *RT = Friend->getAs<RecordType>())
434 if (Friend->isDependentType())
440 /// Determines whether the given friend class template matches
444 ClassTemplateDecl *Friend) {
447 // Check whether the friend is the template of a class in the
468 if (Friend == CTD->getCanonicalDecl())
477 if (CTD->getDeclName() != Friend->getDeclName())
480 // If the class's context can't instantiate to the friend's
483 Friend->getDeclContext()))
493 /// Determines whether the given friend function matches anything in
497 FunctionDecl *Friend) {
502 if (Friend == *I)
505 if (EC.isDependent() && MightInstantiateTo(S, *I, Friend))
512 /// Determines whether the given friend function template matches
516 FunctionTemplateDecl *Friend) {
532 if (Friend == FTD)
535 if (EC.isDependent() && MightInstantiateTo(S, FTD, Friend))
542 /// Determines whether the given friend declaration matches anything
547 // Whitelist accesses if there's an invalid or unsupported friend
555 NamedDecl *Friend
560 if (isa<ClassTemplateDecl>(Friend))
561 return MatchesFriend(S, EC, cast<ClassTemplateDecl>(Friend));
563 if (isa<FunctionTemplateDecl>(Friend))
564 return MatchesFriend(S, EC, cast<FunctionTemplateDecl>(Friend));
566 if (isa<CXXRecordDecl>(Friend))
567 return MatchesFriend(S, EC, cast<CXXRecordDecl>(Friend));
569 assert(isa<FunctionDecl>(Friend) && "unknown friend decl kind");
570 return MatchesFriend(S, EC, cast<FunctionDecl>(Friend));
581 FriendDecl *Friend = *I;
583 switch (MatchesFriend(S, EC, Friend)) {
602 /// A helper class for checking for a friend which will grant access
693 /// Search for a class P that EC is a friend of, under the constraint
778 // granted because the reference occurs in a friend or member of
844 // access if the access occurs in a friend or member of some class P
848 // address that above. The 'friend' aspect is completely ridiculous
851 // however, we should ignore whether the naming class is a friend,
852 // and instead rely on whether any potential P is a friend.
880 /// taking friend declarations into account.
886 /// friend of class N, or
888 /// friend of class N, or in a member or friend of a class P
897 /// [B2] R occurs in a member or friend of class N, and an invented public
899 /// [B3] R occurs in a member or friend of a class P derived from N, and an
956 // Derive the friend-modified access along each path.
998 // friend-modified access.
1345 // made without data) that the friend declaration will determine
1462 // Or we might be parsing something that will turn out to be a friend:
1482 // of the declaration, just in case it's a friend of something.
1750 /// Checks access to the target of a friend declaration.