• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/clang/lib/Sema/

Lines Matching refs:access

9 // This file provides Sema routines for C++ access control semantics.
36 /// SetMemberAccessSpecifier - Set the access specifier of a member.
37 /// Returns true on error (when the previous member decl access specifier
38 /// is different from the new member decl access specifier).
43 // Use the lexical access specifier.
48 // C++ [class.access.spec]p3: When a member is redeclared its access
87 // C++11 [class.access.nest]p1:
88 // A nested class is a member and as such has the same access
90 // C++11 [class.access]p2:
91 // A member of a class can also access all the names to which
92 // the class has access. A local class of a member function
93 // may access the same names that the member function itself
94 // may access.
133 /// doing access-control without privileges.
594 /// A helper class for checking for a friend which will grant access
632 /// the final class in the path would have access in that class.
646 // base will not have any access in classes derived from Cur.
688 /// NamingClass would have some natural access in P, which implicitly
693 /// would have to have some natural access in P, it says the actual
694 /// target has to have some natural access in P, which opens up the
700 /// access a forbidden base class's members by directly subclassing
702 /// - It also makes access substantially harder to compute because it
764 // An additional access check beyond those described earlier in
765 // [class.access] is applied when a non-static data member or
767 // class. As described earlier, access to a protected member is
769 // some class C. If the access is to form a pointer to member,
797 // pointer-to-member expression nor in a member access: when
834 // access if the access occurs in a friend or member of some class P
836 // access in P. The 'member' aspect is easy to handle because P
872 /// C++0x [class.access.base]p5:
884 /// C++0x [class.access.base]p4:
900 /// access equivalent to the member's access. Therefore we need only
905 /// B_i). For i in 1..n, we will calculate ACAB(i), the access to the
907 /// Access(a, b) = (* access on the base specifier from a to b *)
922 /// \param FinalAccess the access of the "final step", or AS_public if
942 assert(FinalAccess != AS_none && "forbidden access after declaring class");
946 // Derive the friend-modified access along each path.
988 // friend-modified access.
1012 /// Given that an entity has protected natural access, check whether
1013 /// access might be denied because of the protected member access
1038 // access.
1042 // access here would grant us access overall.
1060 assert(InstanceContext && "diagnosing dependent access");
1090 /// We are unable to access a given declaration due to its direct
1091 /// access control; diagnose that.
1158 // The natural access so far.
1182 llvm_unreachable("cannot diagnose dependent access");
1202 // If the access to this base is worse than the access we have to
1218 llvm_unreachable("cannot diagnose dependent access");
1221 // If this was private inheritance, but we don't have access to
1230 // If we don't have a constraining base, the access failure must be
1320 assert(UnprivilegedAccess != AS_public && "public access not weeded out");
1322 // Before we try to recalculate access paths, try to white-list
1325 // common forms of privileged access.
1330 // *have* to delay immediately here: we can do the full access
1335 // access.
1361 // equivalent to checking the access of a notional public
1378 // Append the declaration's access if applicable.
1385 "access along best path worse than direct?");
1395 assert(EC.isDependent() && "delaying non-dependent access");
1397 assert(DC->isDependentContext() && "delaying non-dependent access");
1408 /// Checks access to an entity from the given effective context.
1413 assert(Entity.getAccess() != AS_public && "called for public access!");
1433 llvm_unreachable("invalid access result");
1438 // If the access path is public, it's accessible everywhere.
1443 // access control checking, because our effective context might be
1464 llvm_unreachable("invalid access result");
1544 /// Perform access-control checking on a previously-unresolved member
1545 /// access which has now been resolved to a member.
1586 llvm_unreachable("bad access result");
1596 // There's never a path involved when checking implicit destructor access.
1612 /// Checks access to a constructor.
1655 /// Checks access to a constructor.
1697 /// Checks access to an overloaded operator new or delete.
1717 /// Checks access to a member.
1732 /// Checks implicit access to a member in a structured binding.
1748 /// Checks access to an overloaded member operator, including
1770 /// Checks access to the target of a friend declaration.
1775 // inheritance path modifying access.
1776 AccessSpecifier access = target->getAccess();
1778 if (!getLangOpts().AccessControl || access == AS_public)
1785 DeclAccessPair::make(target, access),
1799 llvm_unreachable("invalid access result");
1820 /// Checks access for a hierarchy conversion.
1822 /// \param ForceCheck true if this check should be performed even if access
1860 /// Checks access to all the declarations in the given result set.
1863 && "performing access check without access control");
1864 assert(R.getNamingClass() && "performing access check without naming class");
1877 /// Checks access to Target from the given class. The check will take access
1878 /// specifiers into account, but no member access expressions and such.
1882 /// \param BaseType type of the left side of member access expression.
1883 /// \p BaseType and \p NamingClass are used for C++ access control.
1885 /// - lhs.target (member access without a qualifier):
1887 /// - lhs.X::target (member access with a qualifier):
1889 /// - X::target (qualified lookup without member access):
1900 // The unprivileged access is AS_none as we don't know how the member was
1901 // accessed, which is described by the access in DeclAccessPair.
1902 // `IsAccessible` will examine the actual access of Target (i.e.
1903 // Decl->getAccess()) when calculating the access.