diff options
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 98f96bc68da..1741bdb1efa 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/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()); } } |