aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-01-28 07:38:46 +0000
committerJohn McCall <rjmccall@apple.com>2010-01-28 07:38:46 +0000
commit233a6419097ed97b67ff8efcacef9af613262ca3 (patch)
tree00e7ad62e4b8dd64ae39663f04d14e3812292a00 /lib/Sema/SemaOverload.cpp
parentd93256e55673a17d18543397ec462416acb13792 (diff)
Access control for surrogate function calls. Required a moderately gross hack
to get the access bits set properly in conversion sets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94744 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 55259fca4f..86b1e37f10 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -6231,7 +6231,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object,
= cast<CXXConversionDecl>(
Best->Conversions[0].UserDefined.ConversionFunction);
- // FIXME: access control
+ CheckMemberOperatorAccess(LParenLoc, Object, Conv, Best->getAccess());
// We selected one of the surrogate functions that converts the
// object parameter to a function pointer. Perform the conversion
@@ -6246,8 +6246,8 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object,
CommaLocs, RParenLoc).release();
}
- if (getLangOptions().AccessControl)
- CheckAccess(R, Best->Function, Best->getAccess());
+ CheckMemberOperatorAccess(LParenLoc, Object,
+ Best->Function, Best->getAccess());
// We found an overloaded operator(). Build a CXXOperatorCallExpr
// that calls this method, using Object for the implicit object