aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-01-28 01:54:34 +0000
committerJohn McCall <rjmccall@apple.com>2010-01-28 01:54:34 +0000
commit41d8903731782ee85ee2b19734008b006e01c76f (patch)
treee668038e0065d9f8b6f75ff891d2adae33acfdcb /lib/Sema/SemaOverload.cpp
parent5357b615364c17ea024c757354c58ae2a520d216 (diff)
Access control for overloaded call operators. Not for surrogates yet,
mostly because we're going to want a better diagnostic for conversions. Also this API needs to go back to sanity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 5506eeb4b2..55259fca4f 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -6231,6 +6231,8 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object,
= cast<CXXConversionDecl>(
Best->Conversions[0].UserDefined.ConversionFunction);
+ // FIXME: access control
+
// We selected one of the surrogate functions that converts the
// object parameter to a function pointer. Perform the conversion
// on the object argument, then let ActOnCallExpr finish the job.
@@ -6244,6 +6246,9 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object,
CommaLocs, RParenLoc).release();
}
+ if (getLangOptions().AccessControl)
+ CheckAccess(R, Best->Function, Best->getAccess());
+
// We found an overloaded operator(). Build a CXXOperatorCallExpr
// that calls this method, using Object for the implicit object
// parameter and passing along the remaining arguments.