Lines Matching refs:Entity
150 AccessTarget(const AccessedEntity &Entity) in AccessTarget()
151 : AccessedEntity(Entity) { in AccessTarget()
1266 AccessTarget &Entity) { in DiagnoseBadAccess() argument
1267 const CXXRecordDecl *NamingClass = Entity.getNamingClass(); in DiagnoseBadAccess()
1268 const CXXRecordDecl *DeclaringClass = Entity.getDeclaringClass(); in DiagnoseBadAccess()
1269 NamedDecl *D = (Entity.isMemberAccess() ? Entity.getTargetDecl() : nullptr); in DiagnoseBadAccess()
1271 S.Diag(Loc, Entity.getDiag()) in DiagnoseBadAccess()
1272 << (Entity.getAccess() == AS_protected) in DiagnoseBadAccess()
1276 DiagnoseAccessPath(S, EC, Entity); in DiagnoseBadAccess()
1301 AccessTarget &Entity) { in IsMicrosoftUsingDeclarationAccessBug() argument
1303 dyn_cast<UsingShadowDecl>(Entity.getTargetDecl())) { in IsMicrosoftUsingDeclarationAccessBug()
1304 const NamedDecl *OrigDecl = Entity.getTargetDecl()->getUnderlyingDecl(); in IsMicrosoftUsingDeclarationAccessBug()
1305 if (Entity.getTargetDecl()->getAccess() == AS_private && in IsMicrosoftUsingDeclarationAccessBug()
1321 AccessTarget &Entity) { in IsAccessible() argument
1323 const CXXRecordDecl *NamingClass = Entity.getEffectiveNamingClass(); in IsAccessible()
1325 AccessSpecifier UnprivilegedAccess = Entity.getAccess(); in IsAccessible()
1333 switch (HasAccess(S, EC, NamingClass, UnprivilegedAccess, Entity)) { in IsAccessible()
1349 AccessTarget::SavedInstanceContext _ = Entity.saveInstanceContext(); in IsAccessible()
1355 if (Entity.isMemberAccess()) { in IsAccessible()
1358 NamedDecl *Target = Entity.getTargetDecl(); in IsAccessible()
1359 const CXXRecordDecl *DeclaringClass = Entity.getDeclaringClass(); in IsAccessible()
1362 switch (HasAccess(S, EC, DeclaringClass, FinalAccess, Entity)) { in IsAccessible()
1370 Entity.suppressInstanceContext(); in IsAccessible()
1382 assert(Entity.getDeclaringClass() != NamingClass); in IsAccessible()
1386 CXXBasePath *Path = FindBestPath(S, EC, Entity, FinalAccess, Paths); in IsAccessible()
1400 const AccessTarget &Entity) { in DelayDependentAccess() argument
1406 Entity.isMemberAccess(), in DelayDependentAccess()
1407 Entity.getAccess(), in DelayDependentAccess()
1408 Entity.getTargetDecl(), in DelayDependentAccess()
1409 Entity.getNamingClass(), in DelayDependentAccess()
1410 Entity.getBaseObjectType(), in DelayDependentAccess()
1411 Entity.getDiag()); in DelayDependentAccess()
1418 AccessTarget &Entity) { in CheckEffectiveAccess() argument
1419 assert(Entity.getAccess() != AS_public && "called for public access!"); in CheckEffectiveAccess()
1421 switch (IsAccessible(S, EC, Entity)) { in CheckEffectiveAccess()
1423 DelayDependentAccess(S, EC, Loc, Entity); in CheckEffectiveAccess()
1428 IsMicrosoftUsingDeclarationAccessBug(S, Loc, Entity)) in CheckEffectiveAccess()
1430 if (!Entity.isQuiet()) in CheckEffectiveAccess()
1431 DiagnoseBadAccess(S, Loc, EC, Entity); in CheckEffectiveAccess()
1443 AccessTarget &Entity) { in CheckAccess() argument
1445 if (Entity.getAccess() == AS_public) in CheckAccess()
1460 S.DelayedDiagnostics.add(DelayedDiagnostic::makeAccess(Loc, Entity)); in CheckAccess()
1465 switch (CheckEffectiveAccess(S, EC, Loc, Entity)) { in CheckAccess()
1518 AccessTarget Entity(Context, in HandleDependentAccessCheck() local
1523 Entity.setDiag(DD.getDiagnostic()); in HandleDependentAccessCheck()
1524 CheckAccess(*this, Loc, Entity); in HandleDependentAccessCheck()
1526 AccessTarget Entity(Context, in HandleDependentAccessCheck() local
1531 Entity.setDiag(DD.getDiagnostic()); in HandleDependentAccessCheck()
1532 CheckAccess(*this, Loc, Entity); in HandleDependentAccessCheck()
1543 AccessTarget Entity(Context, AccessTarget::Member, E->getNamingClass(), in CheckUnresolvedLookupAccess() local
1545 Entity.setDiag(diag::err_access) << E->getSourceRange(); in CheckUnresolvedLookupAccess()
1547 return CheckAccess(*this, E->getNameLoc(), Entity); in CheckUnresolvedLookupAccess()
1562 AccessTarget Entity(Context, AccessTarget::Member, E->getNamingClass(), in CheckUnresolvedMemberAccess() local
1564 Entity.setDiag(diag::err_access) << E->getSourceRange(); in CheckUnresolvedMemberAccess()
1566 return CheckAccess(*this, E->getMemberLoc(), Entity); in CheckUnresolvedMemberAccess()
1607 AccessTarget Entity(Context, AccessTarget::Member, NamingClass, in CheckDestructorAccess() local
1610 Entity.setDiag(PDiag); // TODO: avoid copy in CheckDestructorAccess()
1612 return CheckAccess(*this, Loc, Entity); in CheckDestructorAccess()
1618 const InitializedEntity &Entity, in CheckConstructorAccess() argument
1625 switch (Entity.getKind()) { in CheckConstructorAccess()
1635 PD << Entity.isInheritedVirtualBase() in CheckConstructorAccess()
1636 << Entity.getBaseSpecifier()->getType() << getSpecialMember(Constructor); in CheckConstructorAccess()
1640 const FieldDecl *Field = cast<FieldDecl>(Entity.getDecl()); in CheckConstructorAccess()
1647 StringRef VarName = Entity.getCapturedVarName(); in CheckConstructorAccess()
1649 PD << VarName << Entity.getType() << getSpecialMember(Constructor); in CheckConstructorAccess()
1655 return CheckConstructorAccess(UseLoc, Constructor, Entity, Access, PD); in CheckConstructorAccess()
1661 const InitializedEntity &Entity, in CheckConstructorAccess() argument
1674 if (Entity.getKind() == InitializedEntity::EK_Base) { in CheckConstructorAccess()
1699 AccessTarget Entity(Context, AccessTarget::Member, NamingClass, Found, in CheckAllocationAccess() local
1702 Entity.setDiag(diag::err_access) in CheckAllocationAccess()
1705 return CheckAccess(*this, OpLoc, Entity); in CheckAllocationAccess()
1717 AccessTarget Entity(Context, AccessTarget::Member, NamingClass, in CheckMemberAccess() local
1720 return CheckAccess(*this, UseLoc, Entity); in CheckMemberAccess()
1736 AccessTarget Entity(Context, AccessTarget::Member, NamingClass, Found, in CheckMemberOperatorAccess() local
1738 Entity.setDiag(diag::err_access) in CheckMemberOperatorAccess()
1742 return CheckAccess(*this, OpLoc, Entity); in CheckMemberOperatorAccess()
1787 AccessTarget Entity(Context, AccessTarget::Member, NamingClass, Found, in CheckAddressOfMemberAccess() local
1789 Entity.setDiag(diag::err_access) in CheckAddressOfMemberAccess()
1792 return CheckAccess(*this, Ovl->getNameLoc(), Entity); in CheckAddressOfMemberAccess()
1818 AccessTarget Entity(Context, AccessTarget::Base, BaseD, DerivedD, in CheckBaseClassAccess() local
1821 Entity.setDiag(DiagID) << Derived << Base; in CheckBaseClassAccess()
1825 AccessLoc, Entity)) { in CheckBaseClassAccess()
1832 return CheckAccess(*this, AccessLoc, Entity); in CheckBaseClassAccess()
1843 AccessTarget Entity(Context, AccessedEntity::Member, in CheckLookupAccess() local
1846 Entity.setDiag(diag::err_access); in CheckLookupAccess()
1847 CheckAccess(*this, R.getNameLoc(), Entity); in CheckLookupAccess()
1864 AccessTarget Entity(Context, AccessedEntity::Member, Class, in IsSimplyAccessible() local
1867 if (Entity.getAccess() == AS_public) in IsSimplyAccessible()
1871 return ::IsAccessible(*this, EC, Entity) != ::AR_inaccessible; in IsSimplyAccessible()