aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-09-21 08:36:56 +0000
committerJohn McCall <rjmccall@apple.com>2011-09-21 08:36:56 +0000
commitca82a82082edc982a1fb5fcfef2dd2c8cf9bc824 (patch)
tree5112a8844683e2aa6186e7372bebebe23fd73ba2 /lib/Sema/SemaExprCXX.cpp
parenta8a16d5234eb346513bb0b27368b8660feb33324 (diff)
Enforce access control for conversion operators used in contextual
conversions (rather than just call-arguments). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140244 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 98f96bc68d..1741bdb1ef 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -2065,7 +2065,7 @@ static ExprResult BuildCXXCastArgument(Sema &S,
QualType Ty,
CastKind Kind,
CXXMethodDecl *Method,
- NamedDecl *FoundDecl,
+ DeclAccessPair FoundDecl,
Expr *From) {
switch (Kind) {
default: assert(0 && "Unhandled cast kind!");
@@ -2096,6 +2096,8 @@ static ExprResult BuildCXXCastArgument(Sema &S,
if (Result.isInvalid())
return ExprError();
+ S.CheckMemberOperatorAccess(CastLoc, From, /*arg*/ 0, FoundDecl);
+
return S.MaybeBindToTemporary(Result.get());
}
}