@@ -34,9 +34,6 @@ enum AccessResult {
34
34
AR_dependent
35
35
};
36
36
37
- // / SetMemberAccessSpecifier - Set the access specifier of a member.
38
- // / Returns true on error (when the previous member decl access specifier
39
- // / is different from the new member decl access specifier).
40
37
bool Sema::SetMemberAccessSpecifier (NamedDecl *MemberDecl,
41
38
NamedDecl *PrevMemberDecl,
42
39
AccessSpecifier LexicalAS) {
@@ -1590,8 +1587,6 @@ Sema::AccessResult Sema::CheckUnresolvedLookupAccess(UnresolvedLookupExpr *E,
1590
1587
return CheckAccess (*this , E->getNameLoc (), Entity);
1591
1588
}
1592
1589
1593
- // / Perform access-control checking on a previously-unresolved member
1594
- // / access which has now been resolved to a member.
1595
1590
Sema::AccessResult Sema::CheckUnresolvedMemberAccess (UnresolvedMemberExpr *E,
1596
1591
DeclAccessPair Found) {
1597
1592
if (!getLangOpts ().AccessControl ||
@@ -1609,8 +1604,6 @@ Sema::AccessResult Sema::CheckUnresolvedMemberAccess(UnresolvedMemberExpr *E,
1609
1604
return CheckAccess (*this , E->getMemberLoc (), Entity);
1610
1605
}
1611
1606
1612
- // / Is the given member accessible for the purposes of deciding whether to
1613
- // / define a special member function as deleted?
1614
1607
bool Sema::isMemberAccessibleForDeletion (CXXRecordDecl *NamingClass,
1615
1608
DeclAccessPair Found,
1616
1609
QualType ObjectType,
@@ -1658,7 +1651,6 @@ Sema::AccessResult Sema::CheckDestructorAccess(SourceLocation Loc,
1658
1651
return CheckAccess (*this , Loc, Entity);
1659
1652
}
1660
1653
1661
- // / Checks access to a constructor.
1662
1654
Sema::AccessResult Sema::CheckConstructorAccess (SourceLocation UseLoc,
1663
1655
CXXConstructorDecl *Constructor,
1664
1656
DeclAccessPair Found,
@@ -1705,7 +1697,6 @@ Sema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc,
1705
1697
return CheckConstructorAccess (UseLoc, Constructor, Found, Entity, PD);
1706
1698
}
1707
1699
1708
- // / Checks access to a constructor.
1709
1700
Sema::AccessResult Sema::CheckConstructorAccess (SourceLocation UseLoc,
1710
1701
CXXConstructorDecl *Constructor,
1711
1702
DeclAccessPair Found,
@@ -1747,7 +1738,6 @@ Sema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc,
1747
1738
return CheckAccess (*this , UseLoc, AccessEntity);
1748
1739
}
1749
1740
1750
- // / Checks access to an overloaded operator new or delete.
1751
1741
Sema::AccessResult Sema::CheckAllocationAccess (SourceLocation OpLoc,
1752
1742
SourceRange PlacementRange,
1753
1743
CXXRecordDecl *NamingClass,
@@ -1767,7 +1757,6 @@ Sema::AccessResult Sema::CheckAllocationAccess(SourceLocation OpLoc,
1767
1757
return CheckAccess (*this , OpLoc, Entity);
1768
1758
}
1769
1759
1770
- // / Checks access to a member.
1771
1760
Sema::AccessResult Sema::CheckMemberAccess (SourceLocation UseLoc,
1772
1761
CXXRecordDecl *NamingClass,
1773
1762
DeclAccessPair Found) {
@@ -1782,7 +1771,6 @@ Sema::AccessResult Sema::CheckMemberAccess(SourceLocation UseLoc,
1782
1771
return CheckAccess (*this , UseLoc, Entity);
1783
1772
}
1784
1773
1785
- // / Checks implicit access to a member in a structured binding.
1786
1774
Sema::AccessResult
1787
1775
Sema::CheckStructuredBindingMemberAccess (SourceLocation UseLoc,
1788
1776
CXXRecordDecl *DecomposedClass,
@@ -1815,8 +1803,6 @@ Sema::AccessResult Sema::CheckMemberOperatorAccess(SourceLocation OpLoc,
1815
1803
return CheckAccess (*this , OpLoc, Entity);
1816
1804
}
1817
1805
1818
- // / Checks access to an overloaded member operator, including
1819
- // / conversion operators.
1820
1806
Sema::AccessResult Sema::CheckMemberOperatorAccess (SourceLocation OpLoc,
1821
1807
Expr *ObjectExpr,
1822
1808
Expr *ArgExpr,
@@ -1839,7 +1825,6 @@ Sema::AccessResult Sema::CheckMemberOperatorAccess(SourceLocation OpLoc,
1839
1825
return CheckMemberOperatorAccess (OpLoc, ObjectExpr, R, FoundDecl);
1840
1826
}
1841
1827
1842
- // / Checks access to the target of a friend declaration.
1843
1828
Sema::AccessResult Sema::CheckFriendAccess (NamedDecl *target) {
1844
1829
assert (isa<CXXMethodDecl>(target->getAsFunction ()));
1845
1830
@@ -1889,12 +1874,6 @@ Sema::AccessResult Sema::CheckAddressOfMemberAccess(Expr *OvlExpr,
1889
1874
return CheckAccess (*this , Ovl->getNameLoc (), Entity);
1890
1875
}
1891
1876
1892
- // / Checks access for a hierarchy conversion.
1893
- // /
1894
- // / \param ForceCheck true if this check should be performed even if access
1895
- // / control is disabled; some things rely on this for semantics
1896
- // / \param ForceUnprivileged true if this check should proceed as if the
1897
- // / context had no special privileges
1898
1877
Sema::AccessResult Sema::CheckBaseClassAccess (SourceLocation AccessLoc,
1899
1878
QualType Base,
1900
1879
QualType Derived,
@@ -1929,7 +1908,6 @@ Sema::AccessResult Sema::CheckBaseClassAccess(SourceLocation AccessLoc,
1929
1908
return CheckAccess (*this , AccessLoc, Entity);
1930
1909
}
1931
1910
1932
- // / Checks access to all the declarations in the given result set.
1933
1911
void Sema::CheckLookupAccess (const LookupResult &R) {
1934
1912
assert (getLangOpts ().AccessControl
1935
1913
&& " performing access check without access control" );
@@ -1946,23 +1924,6 @@ void Sema::CheckLookupAccess(const LookupResult &R) {
1946
1924
}
1947
1925
}
1948
1926
1949
- // / Checks access to Target from the given class. The check will take access
1950
- // / specifiers into account, but no member access expressions and such.
1951
- // /
1952
- // / \param Target the declaration to check if it can be accessed
1953
- // / \param NamingClass the class in which the lookup was started.
1954
- // / \param BaseType type of the left side of member access expression.
1955
- // / \p BaseType and \p NamingClass are used for C++ access control.
1956
- // / Depending on the lookup case, they should be set to the following:
1957
- // / - lhs.target (member access without a qualifier):
1958
- // / \p BaseType and \p NamingClass are both the type of 'lhs'.
1959
- // / - lhs.X::target (member access with a qualifier):
1960
- // / BaseType is the type of 'lhs', NamingClass is 'X'
1961
- // / - X::target (qualified lookup without member access):
1962
- // / BaseType is null, NamingClass is 'X'.
1963
- // / - target (unqualified lookup).
1964
- // / BaseType is null, NamingClass is the parent class of 'target'.
1965
- // / \return true if the Target is accessible from the Class, false otherwise.
1966
1927
bool Sema::IsSimplyAccessible (NamedDecl *Target, CXXRecordDecl *NamingClass,
1967
1928
QualType BaseType) {
1968
1929
// Perform the C++ accessibility checks first.
0 commit comments